Skip to content

Instantly share code, notes, and snippets.

@damonsk
Created September 4, 2013 20:12
Show Gist options
  • Save damonsk/6442247 to your computer and use it in GitHub Desktop.
Save damonsk/6442247 to your computer and use it in GitHub Desktop.
// bah.js
module.exports.bah = function(){
function ponies(){
return "hai";
}
};
// test.js
var bah = require("./bah");
console.log(bah.ponies());
@RyanGough
Copy link

a good way to sanity check this stuff is to fire up the node repl and do require("./bah.js") and it will show you what is being exported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment