Deploy Python Flask hello world app using Gunicorn

Create main.py file:

from flask import Flask

app = Flask(__name__)

@app.route('/')
def hello():
    return 'Hello, World!'

if __name__=='__main__':
    app.run()
Install gunicorn:
sudo pip install gunicorn
Run Flask app on port 8000 with Gunicorn:
gunicorn main:app
where:
main - name on the python file
app - name of Flask application component

Spin multiple workers by adding -w option to the command:
gunicorn main:app -w 3