添加初始化代码

This commit is contained in:
qiangyanwen 2022-05-26 09:41:08 +08:00
parent 7de25d3f90
commit 82f667dff0
1 changed files with 1 additions and 2 deletions

3
app.py
View File

@ -12,6 +12,7 @@ from config import settings
from utils.system import host from utils.system import host
from fastapi.middleware.cors import CORSMiddleware from fastapi.middleware.cors import CORSMiddleware
def create_app() -> FastAPI: def create_app() -> FastAPI:
logger.info("loading application configuration") logger.info("loading application configuration")
@ -36,7 +37,6 @@ def create_app() -> FastAPI:
allow_headers=["*"], allow_headers=["*"],
) )
if settings.PROJECT.DEBUG: if settings.PROJECT.DEBUG:
logger.info("Application started successfully:{}".format(CORSMiddleware.__name__)) logger.info("Application started successfully:{}".format(CORSMiddleware.__name__))
logger.info(f"Server address http://{host}:{settings.PROJECT.PORT}") logger.info(f"Server address http://{host}:{settings.PROJECT.PORT}")
@ -46,4 +46,3 @@ def create_app() -> FastAPI:
__all__ = ["create_app"] __all__ = ["create_app"]