This is a skeleton Node.js app running on Express with Nunjucks as a template engine.
It includes:
- Grunt for compliation of sass/js
- GOV.UK Frontend
- Browserify with babelify and Nunjucksify
- Mocha for testing
- Middleware to set correlation headers
- i18n language support
- Snyk
- StandardJS for linting
- nvm (optional) for nodejs version
To get started clone the repo and run
$ npm install
$ npm start
(npm install
might error about Snyk if it’s not set up but ignore for now)
Then go to http://localhost:3000/ to see it in action.
If you work across multiple Node.js projects there's a good chance they require different Node.js and npm versions.
To enable this we use nvm (Node Version Manager) to switch between versions easily.
- install nvm
- Run
nvm install
in the project directory (this will use .nvmrc) - Follow the steps above to install and start