This is a minimal project using express and node witht he GDS toolkit templates.
Clone this repo
Install the dependencies required to run the service and start the server in:
$ npm install
$ npm start
Visit localhost:3000
Alternatively, for development you can run "gulp" to start the server with nodemon and watch for asset changes.
- app - contains client views and routes
- assets - contains static assets and raw JS and SCSS
- gulp - contains gulp build tasks
- public - is generated by the build to contain assets and processed JS and CSS. Contents of public are exposed by express
- govuk_modules - generated by the build containing GDS template assets
The build uses gulp. Add your own gulp tasks in /gulp or below.
The following are provided:
- tasks.js - default and build tasks that compose other tasks
- copy-assets - moves assests to /public
- copy-modules - moves the GDS layouts, assets, and SASS from the dependency into govuk_modules
- nodemon - starts the server
- sass - processes SASS into public/stylesheets
- watch - watches for changes to sass and assets and regenerates
- clean - removes all generated content from /public, /govuk_modules etc
NB This is a minimal starter so there is no JS processing or testing. Add your own.
server.js is kept simple and does the following
- Use nunjucks as the template engine
- Exposes static resources /public, /govuk_modules
- Sets routing to use app/routes.js
-
Delete the commit history:
rm -rf .git
-
Reconstruct the Git repo with only the current content:
git init
git add .
git commit -m "Initial commit"
- Set your new remote origin:
git remote add origin <github-uri>
git push -u --force origin master