Yash030/claude-code-proxy
2
1"""2Claude Code Proxy - Entry Point3 4Minimal entry point that builds the ASGI app via :func:`api.app.create_app`.5Run with: uv run uvicorn server:app --host 0.0.0.0 --port 8082 --timeout-graceful-shutdown 56"""7 8from api.app import create_app, create_asgi_app9 10app = create_asgi_app()11 12__all__ = ["app", "create_app"]13 14if __name__ == "__main__":15 import uvicorn16 17 from cli.process_registry import kill_all_best_effort18 from config.settings import get_settings19 20 settings = get_settings()21 try:22 # timeout_graceful_shutdown ensures uvicorn doesn't hang on task cleanup.23 uvicorn.run(24 app,25 host=settings.host,26 port=settings.port,27 log_level="debug",28 timeout_graceful_shutdown=5,29 )30 finally:31 # Safety net: cleanup subprocesses if lifespan shutdown doesn't fully run.32 kill_all_best_effort()33 