Skip to content
This repository has been archived by the owner on Jul 29, 2020. It is now read-only.

alphagov/gds-nodejs-boilerplate

Repository files navigation

GDS Node.js boilerplate

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.

Using nvm (optional)

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.

  1. install nvm
  2. Run nvm install in the project directory (this will use .nvmrc)
  3. Follow the steps above to install and start

Releases

No releases published

Packages

No packages published