How To Create and Use Node.js Modules

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

This is a super simple way to clear doubts on modules and exports.
I have bookmarked this as a handy reference, till the time I am very thorough with node.

rbiswas
Автор

This is fantastic! I've been using node for a few years now(2) and only knew how to hack my way through using modules.  I definitely want to try using them more now though.  I'd like to see how to use them within a node router.  Keep the videos coming please!

emuinacan
Автор

Bravo, bravo! I knew it was as easy as this, other vids awlays standing on stage chatting a load of *nothing* because all they know is express and not the workings of node for what it really is just so they can get paid to talk tome and time again. Why on earth do such much people use express? lazy i guess, its like the jquery of node. I intend to always keep my code raw js.

DJLNR
Автор

Please, do NOT override module.exports with object like "module.exports = {some: stuff}", use "exports.some = stuff" instead. But you can override module.exports with one function like: "module.exports = function() {};" which is ok.

nkbtnk