website-builder-backend / 48_verify_fastapi_startup.sh
David Prince
fix: add all missing local module stubs (remote_mcp_registry, mcp_auth, mcp_transport, etc)
cce8120
Raw
History Blame Contribute Delete
1.12 kB
#!/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 "========================================"