The frontend for the Digital Hub service using Node
Node >= v10.15.3
npm install
Create a .env
file using the provided template
cp .env-template .env
The .env
can then be configured to point to local or remote backend services as required and toggle application features
The app now takes it's establishment name from the hostname of each request. In order for dev and staging sites to work we use a reg exp /-prisoner-content-hub.*$/g
in order to only use the site name, i.e. production uses wayland.
whereas staging uses wayland-prisoner-content-hub-staging.
. The reg exp ensures wayland
will be used in all cases.
Jest is used for unit and integration tests
npm run test
Cypress is used for E2E testing
Prerequisites
- Backing services will need to be run in Docker-Compose using the
prisoner-content-hub
repository - Your
/etc/hosts
will need to be configured such that127.0.0.1 localhost
includeswayland.prisoner-content-hub.local
berwyn.prisoner-content-hub.local
cookhamwood.prisoner-content-hub.local
To launch the application and open the Cypress test runner
npm run test:e2e:dev
To launch the application and run the Cypress tests
npm run test:e2e:run