Back end/API for UC Berkeley EECS "Flextensions" software
For the environment variables, you will need to configure on your local system (and any deployment machines) the following environment variables (recommended through a .env
file at root):
- DB_PORT (default: 5432)
- DB_USER (default: postgres)
- DB_PASSWORD (default: password)
- DB_NAME (default: postgres)
- CANVAS_URL (no default; will error if not included)
Changing only the user and password then running $make env
should be sufficient.
brew install postgresql chromedriver
- Start postgres if necessary.
brew services start postgresql
sudo apt install postgresql
- Create a postgres user.
sudo su - postgres
(to get into postgres shell)createuser --interactive --pwprompt
(in postgres shell)- Save
DB_USER
andDB_PASSWORD
fields in the.env
file.
- Start postgres if necessary.
pg_ctlcluster 12 main start
- Note: if you are using WSL2 on windows, the command to start postgres is
sudo service postgresql start
- Note: if you are using WSL2 on windows, the command to start postgres is
In order to stand up the server you must first install Overmind. Development has been tested with overmind 2.4.0
With Overmind, you can run $make dev
or $make
There are now two separate instances of Canvas, each with it's own triad of prod/test/beta environments:
We recommend developing in this order:
- ucberkeleysandbox.instructure.com (no risk) - this is the one for which this repo currently has oauth2 keys (secrets)
- bcourses.test.instructure.com (no risk of impacting courses, but contains real data)
- bcourses.berkeley.edu