The default development server for flask is not suited for production environments. Gunicorn is a simple WSGI client written in pure python. This repository serves as a simple example of connecting the two.
This answer on StackOverflow explains why something like Gunicorn is needed.
More on Gunicorn can be found here
export FLASK_APP="app.main:create_app"
flask run
gunicorn -w 4 --reload -b localhost:5000 "app.main:create_app(testing=True)"
#flask #python #gunicorn