Advanced install guide
A quick installation guide for those familiar with Node.js and prototyping in code.
The kit is built on the Express framework, and uses NHS frontend.
Requirements
Node.js version 22 or higher.
Use the template repository
The simplest way to get the kit is to use the template repository on GitHub.
To do this, select the green ‘Use this template’ button instead of cloning or forking the template repository itself.
Manual installation
Alternatively you can choose to install the kit manually by adding nhsuk-prototype-kit to your package.json file and running npm install.
This will install all required dependencies, including Express and NHS frontend.
To use the kit, you will then to create an app.js file like this:
const NHSPrototypeKit = require('nhsuk-prototype-kit')
// Local dependencies
const config = require('./app/config')
const sessionDataDefaults = require('./app/data/session-data-defaults')
const filters = require('./app/filters')
const locals = require('./app/locals')
const routes = require('./app/routes')
const viewsPath = [
'app/views/'
]
const entryPoints = [
'app/assets/sass/main.scss',
'app/assets/javascript/*.js'
]
async function init() {
const prototype = await NHSPrototypeKit.init({
serviceName: config.serviceName,
buildOptions: {
entryPoints
},
viewsPath,
routes,
locals,
filters,
sessionDataDefaults
})
prototype.start(config.port)
}
init()
Run the kit
Start the kit by running:
npm start
Then go to localhost:3000 in your browser.