Add API routing for v1 endpoints and health check functionality

This commit is contained in:
JSC
2025-07-25 11:24:03 +02:00
parent c5c3e8442e
commit c219aaac1a
4 changed files with 41 additions and 6 deletions

View File

@@ -3,6 +3,7 @@ from contextlib import asynccontextmanager
from fastapi import FastAPI
from app.api import api_router
from app.core.database import init_db
from app.core.logging import get_logger, setup_logging
from app.middleware.logging import LoggingMiddleware
@@ -29,12 +30,8 @@ def create_app() -> FastAPI:
app.add_middleware(LoggingMiddleware)
logger = get_logger(__name__)
@app.get("/")
def health() -> dict[str, str]:
logger.info("Health check endpoint accessed")
return {"status": "healthy"}
# Include API routes
app.include_router(api_router)
return app