added definition

This commit is contained in:
brb
2023-07-13 11:29:29 +02:00
parent 614a85c429
commit 493dc874f0
3 changed files with 66 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import uvicorn
from setup_logging import setup_logging
from app import app
import logging
import os
if __name__ == '__main__':
# setup
setup_logging()
listen_ip = os.getenv('LISTEN_IP', default='0.0.0.0')
listen_port = int(os.getenv('LISTEN_PORT', default=8000))
logging.info(f'starting FastAPI server ({listen_ip}:{listen_port})')
uvicorn.run(
app=app,
host=listen_ip,
port=listen_port
)