To start the server
- Install dependencies with
mix deps.get
- export MANIFESTS="/path/to/manifests"
- export DBUSER="reader"
- export DBPASS="reader"
- For those themes that have them generate the distinct lookups with
mix distinct.generate transport.anonymised_mot_tests
- Start server with MIX_ENV=dev mix phoenix.server`
To run tests, you need to make sure your manifests are not picked up by running
MANIFESTS=/tmp mix test
Now you can visit localhost:4000
from your browser.
The table below documents the environment variables used/interpreted by the api server.
Environment Var | Description | Example | Default |
---|---|---|---|
MANIFESTS | Location of folder containing theme and manifests folders | /var/lib/apiserver/ | None |
MIX_ENV | Which version of app to run | DEV, TEST, PROD | DEV |
PGPORT | Port on which Postgres is listening | 5432 | 5432 |
DBUSER | Username for reading from database | reader | |
DBPASS | Password for user reading from database | reader | |
GA_KEY | A Google Analytics key, presence of which creates relevant block | UA-XXXXXXXX-1 |