Files
Wu Clan 470cd9a9c2 adopt ruff formatter (#242)
* adopt ruff formatter

* Fix merge format
2023-11-22 19:09:08 +08:00

36 lines
1.1 KiB
Python

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import uvicorn
from path import Path
from backend.app.common.log import log
from backend.app.core.conf import settings
from backend.app.core.registrar import register_app
app = register_app()
if __name__ == '__main__':
try:
log.info(
"""\n
/$$$$$$$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$
| $$_____/ | $$ /$$__ $$| $$__ $$|_ $$_/
| $$ /$$$$$$ /$$$$$$$ /$$$$$$ | $$ | $$| $$ | $$ | $$
| $$$$$|____ $$ /$$_____/|_ $$_/ | $$$$$$$$| $$$$$$$/ | $$
| $$__/ /$$$$$$$| $$$$$$ | $$ | $$__ $$| $$____/ | $$
| $$ /$$__ $$ |____ $$ | $$ /$$| $$ | $$| $$ | $$
| $$ | $$$$$$$ /$$$$$$$/ | $$$$/| $$ | $$| $$ /$$$$$$
|__/ |_______/|_______/ |___/ |__/ |__/|__/ |______/
"""
)
uvicorn.run(
app=f'{Path(__file__).stem}:app',
host=settings.UVICORN_HOST,
port=settings.UVICORN_PORT,
reload=settings.UVICORN_RELOAD,
)
except Exception as e:
log.error(f'❌ FastAPI start filed: {e}')