@mytec: iter2.1 ready for testing
This commit is contained in:
22
backend/run_server.py
Normal file
22
backend/run_server.py
Normal file
@@ -0,0 +1,22 @@
|
||||
"""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',
|
||||
)
|
||||
Reference in New Issue
Block a user