diff options
Diffstat (limited to 'notes.txt')
-rw-r--r-- | notes.txt | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -26,3 +26,9 @@ $ node --debug-brk app.js $ node-inspector & http://0.0.0.0:8080/debug?port=5858 +[module.exports vs exports] +- if you want your module to be of a specific object type (boolean, string, etc), + use module.exports; if you want your module to be a typical module instance, use exports +- result of attaching properties to module.exports is akin (same) to attaching properties to exports +- http://www.hacksparrow.com/node-js-exports-vs-module-exports.html + |