Exporting and Consuming Modules

suggest change

Remarks

While everything in Node.js is generally done asynchronously, require() is not one of those things. Since modules in practice only need to be loaded once, it is a blocking operation and should be used properly.

Modules are cached after the first time they are loaded. Should you be editing a module in development, you will need to delete its entry in the module cache in order to use new changes. That being said, even if a module is cleared out of the module cache, the module itself is not garbage collected, so care should be taken for its use in production environments.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Exporting and consuming modules:
* Exporting and Consuming Modules

Table Of Contents
1 npm
4 Exporting and consuming modules
41 cli
43 grunt
59 Hack
64 ES6
67 Redis
69 MongoDB
86 MongoDB
87 Lodash
91 CORS
105 N-API
108 Require