from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from app.api.v1.router import api_router app = FastAPI( title="Ignite Open Source API", version="0.1.0" ) app.add_middleware( CORSMiddleware, allow_origins=["*"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) app.include_router(api_router, prefix="/api") from fastapi.responses import RedirectResponse @app.get("/") def root(): return RedirectResponse(url="/health") @app.get("/health") def health_check(): return {"status": "ok"}