Claude Code commited on
Commit
daa2ce6
·
1 Parent(s): 34e2e40

Claude Code: fix GET / route to return simple JSON for stability

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -199,9 +199,15 @@ def get_brain_response(message: str) -> str:
199
  return handle_brain_response(message)
200
 
201
 
202
- @app.get("/", response_class=FileResponse)
203
  async def root():
204
- """Root endpoint serving the dashboard."""
 
 
 
 
 
 
205
  index_path = f"{static_dir}/index.html"
206
  if os.path.exists(index_path):
207
  return FileResponse(index_path)
 
199
  return handle_brain_response(message)
200
 
201
 
202
+ @app.get("/")
203
  async def root():
204
+ """Root endpoint - simple health check."""
205
+ return {"message": "Cain is running"}
206
+
207
+
208
+ @app.get("/dashboard", response_class=FileResponse)
209
+ async def dashboard():
210
+ """Dashboard endpoint serving the UI."""
211
  index_path = f"{static_dir}/index.html"
212
  if os.path.exists(index_path):
213
  return FileResponse(index_path)