This commit is contained in:
eric
2026-03-28 02:39:29 -05:00
parent 243b9d7acb
commit 4b3c6cbee4
23 changed files with 1468 additions and 173 deletions

14
web.sh
View File

@@ -1,2 +1,12 @@
# Ubuntu本分支控制台入口与无「2」分支的 web / youtube.py 等区分)
uvicorn web2:app --host 0.0.0.0 --port 8001 --reload
#!/usr/bin/env bash
# 兼容入口默认一键开发API + Next。仅后端: WEB_STACK=api ./web.sh
# 生产部署请用: ./start.sh
set -euo pipefail
cd "$(dirname "$0")"
export PORT="${PORT:-8001}"
PY=python3
command -v python3 >/dev/null 2>&1 || PY=python
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"