Modules
module.exports
The CommonJS module export value. A consumer of the module receives this value through require. Replacing the local exports alias does not replace module.exports.
Formal Syntax & Structure
nodejs syntaxnodejs
module.exports = valueReturn Value
any
The value exposed by this CommonJS module (property value, not a function return).
Working Example
Example Snippetnodejs
module.exports = { label: "Catalog" };console.log(module.exports.label);