Skip to content

Instantly share code, notes, and snippets.

@zoe-1
zoe-1 / gist:d5465682428edc583ccc
Last active August 29, 2015 14:18
Modules & Singleton
// ./lib/index.js
// ./test/index.js
// Both files above make an object with require module as below.
var Version = require('./lib/version');
// Version modified in ./test/index.js
Version.register = function (server, options, next) {
next('Break plugin');
};
@zoe-1
zoe-1 / gist:784100440f0cf2299010
Created April 3, 2015 13:44
Why use a Makefile with node.js project
start:
npm start
install:
npm install
test:
npm test
cov:
@zoe-1
zoe-1 / gist:a1052051d49fb5bd88c2
Created April 3, 2015 16:11
Init hueniversity wiki discussion
// Initiate Discussion