Spaces:
Sleeping
Sleeping
| from fastapi import FastAPI | |
| from fastapi.middleware.cors import CORSMiddleware | |
| from app.routers import rooms, auction, ws | |
| app = FastAPI(title="IPL Auction Simulator") | |
| app.add_middleware( | |
| CORSMiddleware, | |
| allow_origins=["*"], # tighten to your Vercel URL in production | |
| allow_methods=["*"], | |
| allow_headers=["*"], | |
| allow_credentials=True, | |
| ) | |
| app.include_router(rooms.router, prefix="/api/rooms", tags=["rooms"]) | |
| app.include_router(auction.router, prefix="/api/auction", tags=["auction"]) | |
| app.include_router(ws.router, tags=["websocket"]) | |
| def root(): | |
| return {"status": "IPL Auction backend running"} |