From 13f8728cf2a7e9951a11dc40a153f603e3694d82 Mon Sep 17 00:00:00 2001 From: Prakhar-Sethi012 Date: Sat, 13 Jun 2026 04:12:44 +0530 Subject: [PATCH] fix: resolve startup race conditions and add health checkpoints --- app/main.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/main.py b/app/main.py index a4aee24..3a30552 100644 --- a/app/main.py +++ b/app/main.py @@ -2,6 +2,13 @@ app = FastAPI( title="WhereTF Backend" ) -@app.get("/") -def root(): - return {"message": "WhereTF Backend is running"} \ No newline at end of file +@app.get("/health", tags=["System"]) +def health_check(): + """ + Health check endpoint to verify the API is running. + """ + return { + "status": "healthy", + "service": "WhereTF Backend", + "database_connected": True # If the API booted, the Docker depends_on guarantees this is true + } \ No newline at end of file