from fastapi import FastAPI from app.api.routes import todo_router from app.core.config import settings from app.db.session import create_tables app = FastAPI( title=settings.PROJECT_NAME, description=settings.PROJECT_DESCRIPTION, version=settings.PROJECT_VERSION ) # Create tables on startup @app.on_event("startup") async def startup_event(): create_tables() # Include routers app.include_router(todo_router) # Health check endpoint @app.get("/health", tags=["Health"]) async def health_check(): return {"status": "healthy"}