from fastapi import FastAPI from app.api.routes import todos, health from app.core.config import settings from app.db.session import engine from app.models import todo # Create database tables todo.Base.metadata.create_all(bind=engine) app = FastAPI( title=settings.PROJECT_NAME, description="A simple Todo API built with FastAPI and SQLite", version="0.1.0", ) # Include routers app.include_router(todos.router, prefix="/api", tags=["todos"]) app.include_router(health.router, tags=["health"]) if __name__ == "__main__": import uvicorn uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)