diff --git a/run.py b/run.py index e077587e..79ea7d5c 100755 --- a/run.py +++ b/run.py @@ -1,6 +1,11 @@ #!/usr/bin/env python -from modules import socketio, app +from modules import socketio, app, cbpi -socketio.run(app, host='0.0.0.0') +try: + port = int(cbpi.get_config_parameter('port', '5000')) +except ValueError: + port = 5000 + +socketio.run(app, host='0.0.0.0', port=port) diff --git a/update/3_port_config.sql b/update/3_port_config.sql new file mode 100644 index 00000000..8d102fdb --- /dev/null +++ b/update/3_port_config.sql @@ -0,0 +1 @@ +INSERT OR IGNORE INTO config VALUES ('port', 5000, 'number', 'Port to run server (requires restart)', NULL );