from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from app.core.config import get_settings settings = get_settings() app = FastAPI( title=settings.PROJECT_NAME, openapi_url=f"{settings.API_V1_PREFIX}/openapi.json", ) app.add_middleware( CORSMiddleware, allow_origins=settings.CORS_ORIGINS, allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) @app.get("/health") async def health_check(): return {"status": "ok", "version": "0.1.0"}