17 lines
441 B
Python
17 lines
441 B
Python
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
|
|
) |