YchKhan commited on
Commit
330e345
·
verified ·
1 Parent(s): cc2d90e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -55,6 +55,17 @@ class ConnectionManager:
55
 
56
  manager = ConnectionManager()
57
 
 
 
 
 
 
 
 
 
 
 
 
58
  @app.post("/v1/mock")
59
  async def mock_endpoint(request: Request):
60
  """
 
55
 
56
  manager = ConnectionManager()
57
 
58
+
59
+ @app.get("/", response_class=HTMLResponse)
60
+ async def root():
61
+ """Serve the main HTML page."""
62
+ try:
63
+ with open("static/index.html", "r", encoding="utf-8") as f:
64
+ return HTMLResponse(content=f.read())
65
+ except FileNotFoundError:
66
+ raise HTTPException(status_code=404, detail="index.html not found")
67
+
68
+
69
  @app.post("/v1/mock")
70
  async def mock_endpoint(request: Request):
71
  """