19 lines
396 B
Python
19 lines
396 B
Python
|
|
from fastapi import FastAPI
|
||
|
|
|
||
|
|
from app.api.health import router as health_router
|
||
|
|
from app.core.config import settings
|
||
|
|
|
||
|
|
|
||
|
|
def create_app() -> FastAPI:
|
||
|
|
app = FastAPI(title=settings.PROJECT_NAME)
|
||
|
|
app.include_router(health_router, prefix="/api")
|
||
|
|
|
||
|
|
@app.get("/")
|
||
|
|
async def root():
|
||
|
|
return {"message": "Welcome to the minimal FastAPI template"}
|
||
|
|
|
||
|
|
return app
|
||
|
|
|
||
|
|
|
||
|
|
app = create_app()
|