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.
 
 

24 lines
639 B

import uvicorn
from fastapi import FastAPI, HTTPException
from fastapi.responses import ORJSONResponse
from core.settings import settings
from api.main_router import router as main_router
from api.another_router import router as another_router
app = FastAPI(default_response_class=ORJSONResponse)
#api/hello
app.include_router(
router=main_router,
prefix="/api",
tags=["Основной роутер"]
)
app.include_router(
router=another_router,
prefix="/another",
tags=["Побочный роутер"]
)
if __name__ == "__main__":
uvicorn.run(app, host=settings.run.host, port=settings.run.port)