refactor: serve.py 改用 starlette + uvicorn,统一支持 HTTP/WebSocket/API 代理

This commit is contained in:
Hermes Agent
2026-05-13 13:25:16 +08:00
parent 518e19a282
commit cbde341d8f
3 changed files with 89 additions and 103 deletions
+2 -4
View File
@@ -100,10 +100,8 @@ cd "$FRONTEND_DIR"
npm install
npm run build
# 安装前端 Python 依赖 (serve.py 需要 websockets)
if ! pip show websockets &>/dev/null; then
pip install -r requirements.txt
fi
# 安装前端 Python 依赖 (starlette + uvicorn)
pip install -r requirements.txt
echo -e "${YELLOW}[5/5] 验证前端...${NC}"
if [[ -d "dist" ]]; then