import os
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from routers import health, info

app = FastAPI(title="{{name}}")

app.add_middleware(
    CORSMiddleware,
    allow_origins=[os.environ.get("ALLOWED_ORIGIN", "http://localhost:4200")],
    allow_methods=["*"],
    allow_headers=["Content-Type", "Authorization"],
)

app.include_router(health.router)
app.include_router(info.router, prefix="/api/v1")
