Add API routing for v1 endpoints and health check functionality
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user