i am new to express framework. I need to understand the differences between "module.exports" and "exports" ?
Asked
Active
Viewed 42 times
0
-
2Possible duplicate of [What do "module.exports" and "exports.methods" mean in NodeJS / Express?](http://stackoverflow.com/questions/6116960/what-do-module-exports-and-exports-methods-mean-in-nodejs-express) – Matt Feb 15 '16 at 20:02
1 Answers
1
exports and module.exports reference the same object. Exports is a variable that lives on module.exports. module.exports encapsulates related code into a single unit of code i.e. any methods or variable defined inside the module.exports can be available in other files. Have a look to this for more clarity more on module.exports

Community
- 1
- 1

Godfrey Fernandes
- 139
- 1
- 10