Created: 2011-07-10 09:08
Updated: 2018-12-17 03:36


A skeleton Flask, CherryPy, MongoDB app.


  • Flask, easy_install flask
  • CherryPy WSGI Server, easy_install cherrypy (for production)


  • Run the install script python install.py and choose the port the app will run at (default is 5000)
  • Configure MongoDB database settings in config.py (optional)


Flask/Werkzeug Server (for development)

The app can be run through the Werkzeug WSGI server that comes with Flask. To run it, execute python flask_app.py. Provided you have set DEBUG = True in your config.py file, this option will give you an interactive debugger and your app will be reloaded if changes to source files are detected.

CherryPy WSGI Server (for production)

  1. Run ./start_server.sh. This will launch cherryd with settings coming from cherrypy.conf that uses an 'in-between' script create_flask_app.py to attach the Flask Object to the server
  2. A file, cherrypy.pid will be created that has the id of the process running
  3. Calling ./stop_server.sh will read the .pid file and kill the process waiting for child threads to terminate
Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more