Files
rfcp/backend/run_server.py

23 lines
475 B
Python

"""Entry point for PyInstaller bundle"""
import os
import sys
# Set base path for PyInstaller
if getattr(sys, 'frozen', False):
# Running as compiled
os.chdir(os.path.dirname(sys.executable))
import uvicorn
from app.main import app
if __name__ == '__main__':
host = os.environ.get('RFCP_HOST', '127.0.0.1')
port = int(os.environ.get('RFCP_PORT', '8888'))
uvicorn.run(
app,
host=host,
port=port,
log_level='info',
)