This commit is contained in:
2026-01-27 17:40:37 +01:00
parent 82947a7bd6
commit adc2cd572a
55 changed files with 4145 additions and 101 deletions

View File

@@ -1,7 +1,23 @@
from fastapi import FastAPI
from app.api.api import api_router
from app.core.config import settings
from fastapi.middleware.cors import CORSMiddleware
app = FastAPI(title="Auteur AI API")
app = FastAPI(title=settings.PROJECT_NAME, openapi_url=f"{settings.API_V1_STR}/openapi.json")
# Set all CORS enabled origins
# Set all CORS enabled origins
# Always enable for dev to prevent frustration
app.add_middleware(
CORSMiddleware,
allow_origins=["http://localhost:3000", "http://localhost:5173", "*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
app.include_router(api_router, prefix=settings.API_V1_STR)
@app.get("/")
async def root():