Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

What do "module.exports" and "exports.methods" mean in NodeJS / Express

// foo.js
module.exports = 42;

// main.js
console.log(require("foo") === 42); // true
Source by www.sitepoint.com #
 
PREVIOUS NEXT
Tagged: #What #NodeJS #Express
ADD COMMENT
Topic
Name
8+6 =