github-actions[bot] commited on
Commit
ded713d
·
1 Parent(s): a3f924b

deploy: switch to chatterbox requirements @ b336ac4

Browse files
Files changed (1) hide show
  1. server.py +7 -0
server.py CHANGED
@@ -889,6 +889,13 @@ if __name__ == "__main__":
889
 
890
  local_app.include_router(router)
891
 
 
 
 
 
 
 
 
892
  import uvicorn
893
  port = int(os.getenv("PORT", 8000))
894
  uvicorn.run(local_app, host="0.0.0.0", port=port)
 
889
 
890
  local_app.include_router(router)
891
 
892
+ # Serve the legacy static frontend at / so `python server.py` keeps the
893
+ # old dev UX (open http://localhost:8000 to hit frontend/index.html).
894
+ # The React SPA in production is deployed separately to S3.
895
+ frontend_dir = Path(__file__).parent / "frontend"
896
+ if frontend_dir.exists():
897
+ local_app.mount("/", StaticFiles(directory=str(frontend_dir), html=True), name="frontend")
898
+
899
  import uvicorn
900
  port = int(os.getenv("PORT", 8000))
901
  uvicorn.run(local_app, host="0.0.0.0", port=port)