Files
stock-agent/scripts/start-server.sh
Gahow Wang 1db5a6365c chore(deploy): bind vite to localhost behind nginx and enable env proxy for node fetch
Vite is now only an upstream for the nginx :5443 HTTPS entrypoint, and the
API server opts into NODE_USE_ENV_PROXY so Nasdaq/Yahoo requests go through
the host proxy. Ignore the .qoder/ IDE session directory.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 00:16:34 +08:00

15 lines
499 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${ROOT_DIR}"
export PATH="/home/gahow/.local/bin:/home/gahow/.nvm/versions/node/v24.13.1/bin:$PATH"
export HOST="127.0.0.1"
export PORT="${PORT:-8787}"
# Node's built-in fetch does not read HTTPS_PROXY unless this opt-in is enabled.
# The configured Nasdaq/Yahoo data sources require the host's local proxy.
export NODE_USE_ENV_PROXY="${NODE_USE_ENV_PROXY:-1}"
exec npx tsx src/server/index.ts