Add port argument
parent
e518a509cd
commit
ccb5e518e7
|
@ -23,8 +23,12 @@ parser = argparse.ArgumentParser(
|
|||
|
||||
debug_enabled = False
|
||||
listen_host = '0.0.0.0'
|
||||
listen_port = 8006
|
||||
parser.add_argument('--debug', action='store_true', help="Enable debug output")
|
||||
parser.add_argument('--listen', metavar="HOST", help="Listen address")
|
||||
parser.add_argument('--port', metavar="PORT", help="Listen port")
|
||||
|
||||
|
||||
parser.add_argument("-v", "--verbose", action="store_true", help = "Verbose console output")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
@ -136,4 +140,4 @@ def after_request(response):
|
|||
# Run the Flask app
|
||||
if __name__ == '__main__':
|
||||
print(f"Map: {app.url_map}")
|
||||
app.run(debug=debug_enabled, host=listen_host)
|
||||
app.run(debug=debug_enabled, host=listen_host, port=listen_port)
|
||||
|
|
Loading…
Reference in New Issue