Taking server host and port from config

pull/18/head
Steffen Sauler 2017-12-12 13:43:12 +01:00 committed by GitHub
parent 4c04bd02c6
commit 165efc4751
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -19,6 +19,9 @@ configfile = os.path.join(os.environ['DASH_CONFIG'], 'config.cfg')
cfg = configparser.ConfigParser() cfg = configparser.ConfigParser()
cfg.read(configfile) cfg.read(configfile)
server_host = cfg.get("Server", "host")
server_port = cfg.getint("Server", "port")
app = Flask(__name__) app = Flask(__name__)
redis_server_log = redis.StrictRedis( redis_server_log = redis.StrictRedis(
@ -541,4 +544,4 @@ def getTypeaheadData():
return jsonify(data) return jsonify(data)
if __name__ == '__main__': if __name__ == '__main__':
app.run(host='localhost', port=8001, threaded=True) app.run(host=server_host, port=server_port, threaded=True)