Skip to content

Backend Running

Zak Morgan edited this page Jan 29, 2019 · 3 revisions

##Requirements As well as having installed the Backend, you must have built the Frontend, refer to the installation guide and the build guide.

Running the API Locally

Running the API locally requires two shells open: one for Fake Shibboleth and one for the API. Note that API requests can only ever work if you are within the UCL network and have database access credentials.

Start Dependencies

  1. Ensure Postgres is running
  2. Start Redis: sudo service redis-server start

Starting Fake Shibboleth (Shell 1)

cd fakeshibboleth
. venv/bin/activate
./manage.py runserver localhost:8001 --noreload

Starting the API (Shell 2)

cd uclapi/backend/uclapi
. venv/bin/activate
./manage.py runserver

Give it a go!

If those commands work you should be able to navigate to http://localhost:8000/dashboard in your browser, which will let you log in via Fake Shibboleth running on http://localhost:8001. If so, then you're up and running!