Last active
August 29, 2015 14:11
-
-
Save shorttompkins/21b975c642dc7e871a24 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fileA.js: | |
var something = '12345'; | |
module.exports = { | |
doWork: function() { | |
console.log('working!'); | |
}, | |
someVar: 'yo yo yo!', | |
something: something | |
} | |
// fileB.js: | |
var fileA = require('./fileA'); | |
fileA.doWork(); | |
console.log(fileA.someVar); | |
// run: | |
$ node fileB.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment