Spaces:
Runtime error
Runtime error
File size: 593 Bytes
099df87 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
# Updated import - since 'api' folder will be directly under /app in the container
from api.routes import router
app = FastAPI(title="Multi-Agent Research Assistant Backend")
# Register routes
app.include_router(router)
# CORS middleware
app.add_middleware(
CORSMiddleware,
allow_origins=["*"], # tighten in prod
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
@app.get("/")
async def root():
return {"message": "Backend is running. Check /docs for API details."}
|