Selaa lähdekoodia

Merge pull request #89 from carlallen/port_param

Allow setting port by param
tags/3.1_alpha
Manuel83 GitHub 8 vuotta sitten
vanhempi
commit
f8d4015b6e
2 muutettua tiedostoa jossa 8 lisäystä ja 2 poistoa
  1. +7
    -2
      run.py
  2. +1
    -0
      update/3_port_config.sql

+ 7
- 2
run.py Näytä tiedosto

@@ -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
- 0
update/3_port_config.sql Näytä tiedosto

@@ -0,0 +1 @@
INSERT OR IGNORE INTO config VALUES ('port', 5000, 'number', 'Port to run server (requires restart)', NULL );

Loading…
Peruuta
Tallenna