A Flask app serving the homepage of the modENCODE project
- Flask
- CherryPy WSGI Server (for production)
Make sure these are installed:
- Flask
easy_install flask - CherryPy
easy_install cherrypy
- Run the install script
python install.pyand choose the port the app will run at - Configure SMTP and other settings in
config.py - Modify site constants as needed in
models/constants.py
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.
- Run
./start_server.sh. This will launchcherrydwith settings coming fromcherrypy.confthat uses an 'in-between' scriptcreate_flask_app.pyto attach the Flask Object to the server - A file,
cherrypy.pidwill be created that has the id of the process running - Calling
./stop_server.shwill read the .pid file and kill the process waiting for child threads to terminate
Run ./github_update.sh to stop the running server, run a git pull and start the server again.
- Have an RSS feed ready where the last item has the message you want to display in the title with a special trigger-tag in the message that modENCODE should look for.
- Look at
constants.pyfile and modify theMESSAGING_RSS_URLconstant to point to your RSS feed looking for a trigger-tag defined inMESSAGING_RSS_TAG.
- Publish a new item in the RSS feed that will NOT have a trigger-tag in its title.