Paul's Programming Notes PostsRSSGithub

Enable Threading - Flask

http://stackoverflow.com/a/14823968/1364191

If you’re going to be expecting more than one user on your flask server, you need to enable threading like this: app.run(host='0.0.0.0', port=5000, threaded=True)

Unfortunately, the threading makes Ctrl+C not work sometimes and I’ll have to kill the thread manually.

For better solutions for production, check out these WSGI solutions: Deploying Flask with a standalone WSGI server