from fastapi import FastAPI
from app.api.endpoints import users, auth
from app.websocket.connection_manager import wsRouter
from fastapi.middleware.cors import CORSMiddleware

app = FastAPI()

app.include_router(auth.authRouter)
app.include_router(users.usersRouter)
app.include_router(wsRouter)

app.add_middleware(
    CORSMiddleware,
    allow_origins=["*"],
    allow_credentials=True,
    allow_methods=["*"],
    allow_headers=["*"],
)
