You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
547 B
25 lines
547 B
from fastapi import FastAPI
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
from core.settings import settings
|
|
from core.router import router
|
|
app = FastAPI()
|
|
app.add_middleware(
|
|
CORSMiddleware,
|
|
allow_origins=["*"],
|
|
allow_credentials=True,
|
|
allow_methods=["*"],
|
|
allow_headers=["*"],
|
|
)
|
|
|
|
app.include_router(
|
|
router=router,
|
|
)
|
|
|
|
if __name__ == "__main__":
|
|
import uvicorn
|
|
uvicorn.run(
|
|
app,
|
|
host = settings.uvicorn.host,
|
|
port = settings.uvicorn.port,
|
|
reload= settings.uvicorn.reload
|
|
)
|