apacheflaskflask-script

Using Flask-Script with Apache


I'm using Flask-Script. In development, I start my app by calling ./manage.py runserver and that would make it run on port 5000.

I'm trying to deploy my app with Apache. I can't find the directive that would supply the parameter runserver to my app.


Solution

  • You don't. Flask-Script is a convenient way to write management commands. The runserver command simply runs the development server for the app. In production, you don't want to run the development server. Instead, you use a WSGI server such as mod_wsgi or uwsgi and point it directly at the Flask app object. Also see the Flask docs on how to deploy.