""" FastAPI backend for Text to Audiobook application. """ from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware app = FastAPI(title="Text to Audiobook API") # Configure CORS app.add_middleware( CORSMiddleware, allow_origins=["http://localhost:5173", "http://localhost:3000"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) @app.get("/api/health") async def health_check(): """Health check endpoint.""" return {"status": "ok"}