Automated Action 86a4793cce Enhance FastAPI application setup
- Added environment variable support via .env file
- Updated API routes with versioning prefix
- Improved documentation in README
- Enhanced SQLite database path configuration

generated with BackendIM... (backend.im)
2025-05-13 10:15:27 +00:00

17 lines
460 B
Python

from fastapi import FastAPI
from app.api.routes import router as api_router
from app.core.config import settings
app = FastAPI(
title=settings.PROJECT_NAME,
openapi_url=f"{settings.API_V1_STR}/openapi.json",
docs_url="/docs",
redoc_url="/redoc"
)
# Include API router with the version prefix
app.include_router(api_router, prefix=settings.API_V1_STR)
@app.get("/health", tags=["health"])
async def health_check():
return {"status": "ok"}