Spaces:
Sleeping
Sleeping
File size: 1,119 Bytes
cce8120 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | #!/usr/bin/env bash
set -euo pipefail
ROOT=/root/projects/website-builder-backend-clean
cd "$ROOT"
echo "========================================"
echo "Verify FastAPI Startup"
echo "========================================"
echo
echo "[1/6] Compile"
python3 -m py_compile backend/main.py
echo
echo "[2/6] Import"
python3 <<'PY'
import backend.main
print("App:", backend.main.app.title)
print("Runtime:", type(backend.main.dolor3v).__name__)
print("Gateway:", type(backend.main.llm_gateway).__name__)
PY
echo
echo "[3/6] Route count"
python3 <<'PY'
import backend.main
routes = backend.main.app.routes
print("Routes:", len(routes))
for r in routes[:20]:
print(getattr(r, "path", ""), getattr(r, "methods", ""))
PY
echo
echo "[4/6] ASGI validation"
python3 <<'PY'
import backend.main
assert callable(backend.main.app)
print("ASGI application OK")
PY
echo
echo "[5/6] Uvicorn configuration"
python3 -c "import uvicorn"
echo "uvicorn available"
echo
echo "[6/6] Finished"
echo
echo "========================================"
echo "FastAPI Startup Verified"
echo "========================================"
|