Skip to content

companieshouse/psc-verification-web

Repository files navigation

This is a web frontend for the PSC Verification Statements. It was created based on Typescript Web Starter for Companies House.

Frontend technologies and utils

Other CHS services

Installing and running

Requirements

  1. node v20 (engines block in package.json is used to enforce this)
  2. npm v10 (engines block in package.json is used to enforce this)

Having cloned the project into your project root, run the following commands:

cd psc-verification-web

npm install

SSL Set-up

  • If you wish to work with ssl-enabled endpoints locally, ensure you turn the NODE_SSL_ENABLED property to ON in the config and also provide paths to your private key and certificate.

  • In a typical production environment, this might never be required as the Node app usually sits behind a load balancer with SSL termination.

Running the Tests

To run the tests, type the following command:

npm test

To get a summarised test coverage report, run:

npm run coverage

For a detailed test coverage report, run one of the following commands:

npm run coverage:report

or

npm run test:coverage

For these tests, we've used Mocha with Sinon and Chai.

Running the App

To start the application, run:

npm start

or, to watch for changes with auto restart in your dev environment, run:

npm run start:watch

...and navigate to http://localhost:3000/ (or whatever hostname/port number combination you've changed the config values to)

For SSL connections, navigate to https://localhost:3443