Wednesday, September 3, 2014

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: http://flask.pocoo.org/docs/0.10/deploying/wsgi-standalone/

No comments:

Post a Comment