Commit beb4afc8 authored by 崔为之's avatar 崔为之 💪🏽

Update project

parent 7cfb16a4
...@@ -34,13 +34,11 @@ def runserver(): ...@@ -34,13 +34,11 @@ def runserver():
# The 'Server' key is assumed to be a dictionary containing the keys 'IP' and 'Port'. # The 'Server' key is assumed to be a dictionary containing the keys 'IP' and 'Port'.
cfg = app.config['Server'] cfg = app.config['Server']
# Retrieve the host and port from the config. # Retrieve the port from the config.
# If they're not present, default to '0.0.0.0' for the host and '5000' for the port.
host = cfg.get('IP', '0.0.0.0')
port = cfg.get('Port', 5000) port = cfg.get('Port', 5000)
# Run the Flask development server. # Run the Flask development server.
app.run(host=host, port=port, use_reloader=False) app.run(host='0.0.0.0', port=port, use_reloader=False)
if __name__ == '__main__': if __name__ == '__main__':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment