Intellipaat

Node.js Module Components

Modules Modules are similar to JavaScript libraries in that they can be used to include a set of functions in a Node.js application. To include a module in a Node.js application, use the require() function with the module name enclosed in parenthesis. Many modules in Node.js provide the basic functionality required for a web application.

Console The console module provides a debugging method similar to the basic JavaScript console provided by web browsers. Messages are printed to the stoutCluster Node. js is based on the idea of single-threaded programming. Cluster is a module that enables multi-threading by spawning child processes that run concurrently on the same server port. as well as stderr.

Global In Node.js, global objects are available in all modules. These objects include functions, modules, strings, and so on.


Who Upvoted this Story


Comments