from sys import argv from app import app try: Port = 5001 if len(argv) > 1 : Port = int(argv[1]) app.run(host='0.0.0.0', port=Port, debug=True) except Exception as e: print ("Something went wrong, process terminated...") print ("Error Report: " + str(e))