node-require Flashcards
1
Q
What is the purpose of module.exports in a Node.js module?
A
is to add properties or methods in the export object so that it can be used in other modules.
2
Q
How do you import functionality into a Node.js module from another Node.js module?
A
assign it to exports property of the module object and other page use require() method.