mirror of
https://github.com/Manuel83/craftbeerpi3
synced 2026-08-09 18:52:40 +02:00
Allow setting port by param
This commit is contained in:
@@ -1,6 +1,11 @@
|
|||||||
#!/usr/bin/env python
|
#!/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)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
INSERT OR IGNORE INTO config VALUES ('port', 5000, 'number', 'Port to run server (requires restart)', NULL );
|
||||||
Reference in New Issue
Block a user