- Add FastAPI app with title 'Debate API' v1.0.0 - Configure pydantic-settings for environment-based configuration - Create /health endpoint at root level - Create /api/v1/health and /api/v1/health/ready endpoints - Disable docs/redoc in production environment
17 lines
386 B
Python
17 lines
386 B
Python
"""Health check endpoints."""
|
|
|
|
from fastapi import APIRouter
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
@router.get("")
|
|
async def health_check() -> dict[str, str]:
|
|
"""Basic health check endpoint."""
|
|
return {"status": "healthy"}
|
|
|
|
|
|
@router.get("/ready")
|
|
async def readiness_check() -> dict[str, str]:
|
|
"""Readiness check endpoint (DB check added in plan 01-02)."""
|
|
return {"status": "ready"}
|