This starter kit is being used in user research for GOV.UK Frontend.
It's a Node & ExpressJS app, with Nunjucks for templating.
-
First, clone a copy of this repo locally
-
Next, install the dependencies:
$ npm install- To run the web server:
$ npm startYou'll be able to see the app running here: localhost:3005
Take a look in server.js to see how this app works.
Static content is served from the public directory:
app.use('/public', express.static(path.join(__dirname, '/public')))The compiled 'default stylesheet' expects images to be in the images/toolkit and images/template directories.
For the default compiled stylesheet only - this application has been set to serve the govuk_frontend_alpha toolkit and template assets from the node_modules directory:
In server.js:
app.use('/images/toolkit', express.static(path.join(__dirname, '/node_modules/govuk_frontend_alpha/assets/images/toolkit/')))
app.use('/images/template', express.static(path.join(__dirname, '/node_modules/govuk_frontend_alpha/assets/images/template/')))If the application compiles the govuk_frontend_alpha scss files and overrides the stylesheet block, the above config can be removed.
To serve the govuk_frontend_alpha assets from the node_modules directory, in server.js use:
app.use('/public', express.static(path.join(__dirname, '/node_modules/govuk_frontend_alpha/assets/')))To ensure the path to the image assets is correct, $path must be defined at the top of application.scss, find this in assets/scss/application.scss.