Collapse portal under src/, unify pnpm workspace/scripts, thin VIP topic re-exports, drop orphan vip scaffolds and one-shot scripts, ignore xhs/release, document root commands. Co-authored-by: Cursor <cursoragent@cursor.com>
20 lines
507 B
Python
20 lines
507 B
Python
#!/usr/bin/env python3
|
||
"""统一后端启动:uvicorn app.main:app"""
|
||
from __future__ import annotations
|
||
|
||
import os
|
||
import sys
|
||
from pathlib import Path
|
||
|
||
ROOT = Path(__file__).resolve().parent
|
||
SERVICES = ROOT / "services"
|
||
sys.path.insert(0, str(ROOT))
|
||
sys.path.insert(0, str(SERVICES))
|
||
|
||
if __name__ == "__main__":
|
||
import uvicorn
|
||
|
||
host = os.getenv("HOST", "127.0.0.1")
|
||
port = int(os.getenv("PORT", "8080"))
|
||
uvicorn.run("app.main:app", host=host, port=port, reload=os.getenv("RELOAD") == "1")
|