To run NHS.UK frontend locally you'll need to:
- set up git
- install Node.js We recommend to use the long-term support (LTS) version of Nodejs, rather than the latest beta version.
Type
git --version
to check if git is installed. This should print a version number like "git version 2.18.0".
Type
node -v
to check if Node is installed. This should print a version number like "v8.11.3".
Fork the repository first, if you're an external contributor.
You can clone the repository directly if you're a member of the NHS.UK GitHub organisation
git clone [email protected]:nhsuk/nhsuk-frontend.git nhsuk-frontend
Otherwise you'll have to clone your own fork
git clone https://github.com/[Username]/nhsuk-frontend.git nhsuk-frontend
Replace '[Username]' in the git clone command above with your own GitHub username.
We use node package manager (npm) to manage third party dependencies.
Whilst in the project directory you will need to install the dependencies listed in package.json
cd nhsuk-frontend
npm install
This will build files, serve web pages and watch for changes when you save a file.
npm start
The application will be available at http://localhost:3000.
Next: Application architecture