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. Use this code:
git clone [email protected]:nhsuk/nhsuk-frontend.git nhsuk-frontend
cd nhsuk-frontend
You'll have to clone your own fork if you're not a member.
Replace 'Username' in the git clone command below with your GitHub username.
git clone https://github.com/Username/nhsuk-frontend.git nhsuk-frontend
cd nhsuk-frontend
We use node package manager (npm) to manage the dependencies in development, which is included with the Nodejs installation.
Make sure you are in the project directory when you run the
npm install
command below. You can switch to the project directory with the commandcd 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.
You can read our getting started documentation to learn more about our application architecture, tooling, coding standards, testing policies and our pipelines.
Contact us on Slack or email [email protected], if you need help or have any questions.
You will need to create a pull request with your changes. One of the NHS.UK Frontend will review it and approve or feedback on changes required.
You'll need to create a pull request from a fork if you have cloned your own fork.