the default node web boilerplate using express and cluster module
npm install node-web-boilerplate
|2||downloads in the last month|
|Version||0.0.1 last updated 11 months ago|
|Dependencies (8)||express, underscore, path, consolidate, dustjs-linkedin, methods, cluster2, config|
It is a boilerplate for node + expressjs + cluster2 + dustjs + mocha.
Assume you have cloned the repository locally and get into the repo folder.
You can run the server in the boilerplate
make clean install server (the first time) or make server Access http://localhost:8080/
You can run the mocha unit testing alone
npm install -g mocha (if mocha not installed) make clean install test (the first time) or make test
What it includes
Expressjs with some best practises
- Routes in seperate files
- Error handling binded with custom errors
- Content negotiation
- Dust.js integrated with consolidate.js
- Custer2 intrgrated for scalability
- Mocha integrated for web endpoint testing and unit testing.
put config files for each env, env is read from process.NODE_ENV
utils and libraries
img, css, js
route files, refer to base.js. It is better to have modularized route files if project goes big.
dust template files
test folder, mocha is used.