feat: add FastAPI app factory and health check endpoint
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
23
app/routes/health.py
Normal file
23
app/routes/health.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""Health check route for monitoring and readiness probes.
|
||||
|
||||
Provides a simple GET /health endpoint that returns application
|
||||
status, name, and version.
|
||||
"""
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
router = APIRouter(tags=["health"])
|
||||
|
||||
|
||||
@router.get("/health")
|
||||
async def health_check() -> dict:
|
||||
"""Return application health status.
|
||||
|
||||
Returns:
|
||||
JSON with app name, version, and status.
|
||||
"""
|
||||
return {
|
||||
"app": "sneakyswole",
|
||||
"version": "0.1.0",
|
||||
"status": "ok",
|
||||
}
|
||||
Reference in New Issue
Block a user