import uvicorn from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from app.endpoints import login, uonetplus_uczen app = FastAPI(title="Uonetplus API") app.include_router(login.router) app.include_router(uonetplus_uczen.router) origins = [ "http://localhost:8080", ] app.add_middleware( CORSMiddleware, allow_origins=origins, allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) if __name__ == "__main__": uvicorn.run("main:app", host="127.0.0.1", port=8000, reload=True)