This commit is contained in:
eric
2026-05-16 19:24:30 -05:00
parent 19beec12a5
commit 75a0ca4e31
260 changed files with 51345 additions and 1 deletions

16
d2ypp2/web.sh Normal file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/env bash
# 兼容入口:默认一键开发(API + Next)。仅后端: WEB_STACK=api ./web.sh
# 生产部署请用: ./start.sh
set -euo pipefail
cd "$(dirname "$0")"
export PORT="${PORT:-8001}"
if [[ -x ".venv/bin/python" ]]; then
PY=".venv/bin/python"
else
PY=python3
command -v python3 >/dev/null 2>&1 || PY=python
fi
if [[ "${WEB_STACK:-}" == "api" ]]; then
exec "$PY" scripts/launch.py --api-only --host 0.0.0.0 --port "$PORT" --reload
fi
exec "$PY" scripts/launch.py --dev --port "$PORT"