Skip to content

podcastrainers/Flask-Skeleton-App

 
 

Repository files navigation

A skeleton Flask, CherryPy, MongoDB app.

Requirements

  • Flask
  • CherryPy WSGI Server (for production)

Installation

Make sure these are installed:

  • Flask easy_install flask

  • CherryPy easy_install cherrypy

  • Run the install script python install.py and choose the port the app will run at

  • Configure MongoDB database settings in config.py

Running

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

About

A skeleton Linux, CherryPy/Flask, MongoDB, Python stack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published