saadrizvi09 commited on
Commit
eff53bc
·
1 Parent(s): d1b864f

Add health check endpoints

Browse files
Files changed (1) hide show
  1. main.py +9 -0
main.py CHANGED
@@ -59,6 +59,15 @@ app.add_middleware(
59
  allow_headers=["*"],
60
  )
61
 
 
 
 
 
 
 
 
 
 
62
  # --- Pydantic Models (For Request Body) ---
63
  class UserCreate(BaseModel):
64
  email: str
 
59
  allow_headers=["*"],
60
  )
61
 
62
+ # --- Health Check Endpoint ---
63
+ @app.get("/")
64
+ async def root():
65
+ return {"status": "healthy", "message": "AlgoQuant API is running"}
66
+
67
+ @app.get("/health")
68
+ async def health_check():
69
+ return {"status": "healthy", "timestamp": datetime.utcnow().isoformat()}
70
+
71
  # --- Pydantic Models (For Request Body) ---
72
  class UserCreate(BaseModel):
73
  email: str