Skip to content

UKHomeOffice/brp_enquiry_forms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BRP Application project for nodejs

Docker Repository on Quay.io Build Status

Contents

Quick start

Install the dependencies and build the project resources

$ yarn install

Install Redis and make sure you have a running redis instance in the background.

Tested running on redis server version v6.0.9, and npm version v8.10.0.

Initiate the server in development mode (Express is used to serve the static resources in development).

$ yarn run dev

User journeys

Then select one of the following journeys to see the applcation in action

Environment variables

Full list of environment variables

Development documentation

See the development documentation for a complete description of the application and how to maintain and support BRP.

Testing email locally

Run the following docker command to run maildev

docker run -p 1080:1080 -p 1025:1025 maildev/maildev

set the following local environment variables

EMAIL_PORT=1025
EMAIL_HOST='localhost'
EMAIL_SECURE='false'
SMTP_USER='test'
EMAIL_IGNORE_TLS='true'

Run the app like normal and you should see all emails going to http://localhost:1080/

NPM scripts

Start the application in default mode (production). We use Nginx to serve our static resources in production and ci.

$ yarn start

Start the application with Nodemon in development mode. Debug is switched on and the server restarts when the JS or Sass are recompiled.

$ yarn run dev

Run the unit tests

$ yarn run test

Run the EcmaScript (ES) linter. Rules are defined in .eslintrc

$ yarn run lint

Run the jscs style checker. Rules are defined in .jscsrc.json

$ yarn run style

Compile the Sass to CSS

$ yarn run sass

Acceptance tests

For details on Acceptance tests