Allow setting port by param

This commit is contained in:
Carl Allen
2017-07-16 14:31:52 -05:00
parent ca9575ac29
commit a97c5f4585
2 changed files with 8 additions and 2 deletions
+7 -2
View File
@@ -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)
+1
View File
@@ -0,0 +1 @@
INSERT OR IGNORE INTO config VALUES ('port', 5000, 'number', 'Port to run server (requires restart)', NULL );