Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding a production server to Python Flask in Windows

Tags:

python

flask

I have an application setup in Flask and running on localhost in a Windows environment. All of the tutorials I have read said to not use the default Flask server in production.

The production servers Gunicorn and uWSGI both only work in Unix. Is there a way to run either one of those through Windows?

Or do I need to switch the project over to a UNIX development environment?

like image 958
William Ross Avatar asked Mar 04 '16 16:03

William Ross


1 Answers

There's many WSGI servers you can use to serve a Flask application. If you really need to deploy it to Windows, then I did find NWSGI, which might be worth a look.

I think it's fair to say that WSGI servers are few and far between on Windows, as this list only mentioned NWSGI. Unless you have a very good reason to deploy to Windows, I think you're probably better off opting for a *nix environment.

like image 170
Matthew Daly Avatar answered Sep 30 '22 23:09

Matthew Daly