bd - api
This commit is contained in:
18
api/run_api.py
Normal file
18
api/run_api.py
Normal file
@@ -0,0 +1,18 @@
|
||||
"""
|
||||
Скрипт для запуска API сервера
|
||||
"""
|
||||
|
||||
import uvicorn
|
||||
from api.config import config
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(f"Запуск {config.TITLE} v{config.VERSION}")
|
||||
print(f"Документация будет доступна по адресу: http://{config.HOST}:{config.PORT}/docs")
|
||||
|
||||
uvicorn.run(
|
||||
"api.main:app",
|
||||
host=config.HOST,
|
||||
port=config.PORT,
|
||||
reload=config.RELOAD,
|
||||
log_level=config.LOG_LEVEL.lower()
|
||||
)
|
||||
Reference in New Issue
Block a user