To run with Gunicorn in a production environment, do ./runserver.sh
To run with the Flask development engine (eg. for testing), do python app.py
In order to have the server listen on port 80, must be run as sudo
To use this service you will need to have access to the course Google Drive and set up a service account as shown in the gspread documentation here
The Google Drive API also needs to be enabled for this, and course files will need to be shared with the email in the credentials file.
It is possible to deploy the server for local development by opening config.yaml and setting
the option live_update to false. This disables fetching data from Google Drive.
Main folder:
runserver.sh: shell script to launch server with Gunicornmain.py: Python file to launch the server with Github webhookapp.py: Python file with the server-side coderequirements.txt: List of Python module dependenciesconfig.yaml: Configuration optionsasset_manager.py: Module to manage files and spreadsheets on Driveclient_secret.json: Authentication credentials for Drive
static folder:
css/*: CSS files for the sitefonts/*: font files for the sitejs/*: front-end Javascript files for the sitesass/*: SASS style sheets for the site
templates folder:
favicon.ico: icon to display in browser header barindex.html: HTML for site home page