-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanage.py
More file actions
33 lines (27 loc) · 1.13 KB
/
manage.py
File metadata and controls
33 lines (27 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @DateTime: 2023/10/17 14:17
# @SoftWare: PyCharm
import uvicorn
from common.logger import logger
from common.conf import settings
from common.register import create_app
app = create_app()
if __name__ == '__main__':
try:
logger.info(
"""\n
/$$$$$$$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$
| $$_____/ | $$ /$$__ $$| $$__ $$|_ $$_/
| $$ /$$$$$$ /$$$$$$$ /$$$$$$ | $$ | $$| $$ | $$ | $$
| $$$$$|____ $$ /$$_____/|_ $$_/ | $$$$$$$$| $$$$$$$/ | $$
| $$__/ /$$$$$$$| $$$$$$ | $$ | $$__ $$| $$____/ | $$
| $$ /$$__ $$ |____ $$ | $$ /$$| $$ | $$| $$ | $$
| $$ | $$$$$$$ /$$$$$$$/ | $$$$/| $$ | $$| $$ /$$$$$$
|__/ |_______/|_______/ |___/ |__/ |__/|__/ |______/
"""
)
# uvicorn.run('manage:app', host=settings.UVICORN_HOST, port=settings.UVICORN_PORT, reload=False, workers=1)
uvicorn.run('manage:app', host='0.0.0.0', port=8080, reload=False, workers=1) # TEST
except Exception as e:
logger.error(f'❌ FastAPI start filed: {e}')