Skip to content

Instantly share code, notes, and snippets.

@tiagobbraga
Created July 18, 2015 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiagobbraga/9c930044358ed00bde10 to your computer and use it in GitHub Desktop.
Save tiagobbraga/9c930044358ed00bde10 to your computer and use it in GitHub Desktop.
module.exports = function (app, db) {
var module = {};
module.auth = function (req, res) {
// This will be available 'outside'.
// Authy stuff that can be used outside...
};
// Other stuff...
module.pickle = function(cucumber, herbs, vinegar) {
// This will be available 'outside'.
// Pickling stuff...
};
function jarThemPickles(pickle, jar) {
// This will be NOT available 'outside'.
// Pickling stuff...
return pickleJar;
};
return module;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment