from market import app import os #Checks if the run.py file has executed directly and not imported # Run this command to run the application in DEBUG mode # docker run -p 5000:5000 -e DEBUG=1 <image-name> if __name__ == '__main__': app.run(host='0.0.0.0', port=5000, debug=os.environ.get('DEBUG') == '1')
from market import app # Check if the run.py file has executed directly and not imported if __name__ == "__main__": app.run(debug=True)
from market import app #Checks if the run.py file has executed directly and not imported if __name__ == '__main__': app.run(host='0.0.0.0', port=5000, debug=True)
from market import app if __name__ == '__main__': app.run(debug=True, port=5000, use_reloader=False)
from market import app if __name__ == '__main__': app.run(host='0.0.0.0', port=5000, threaded=True, debug=True)
"""Usage: run.py [--host=<host>] [--port=<port>] [--debug | --no-debug] --host=<host> set the host address or leave it to 0.0.0.0. --port=<port> set the port number or leave it to 5700. """ from market import app if __name__ == '__main__': from docopt import docopt arguments = docopt(__doc__, version='0.1dev') host = arguments['--host'] port = arguments['--port'] debug = not arguments['--no-debug'] if not port: port = 5700 if not host: host = '0.0.0.0' app.run(debug=debug, host=host, port=int(port))
from market import app if __name__ == "__main__": app.run()