From 804b4d51a37fe3113595d07dc90c6af9ad6ae3b7 Mon Sep 17 00:00:00 2001 From: Automated Action Date: Sun, 11 May 2025 20:13:26 +0000 Subject: [PATCH] Add /health endpoint to FastAPI application --- main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.py b/main.py index 885dca6..d2b6c30 100644 --- a/main.py +++ b/main.py @@ -29,5 +29,9 @@ app.include_router(todos.router, prefix="/api") def root(): return {"message": "Welcome to Todo API"} +@app.get("/health") +def health(): + return {"status": "healthy"} + if __name__ == "__main__": uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True) \ No newline at end of file