In this tutorial you will learn about the Nodejs Modules and its application with practical example.
What is Node.js Module?
Node.js module is simply an independent, reusable and organized functional unit. Node.js modules usually contains set of functions for a specific purpose or utility. Node.js modules allows you to split or organize simple or complex functionality into single or multiple JavaScript files which can be reused throughout the Node.js application. Every Node.js module in has its own context, thus it does not interfere with other modules.
Node.js Core Modules
Node.js comes with a rich set of built-in or Core modules, which helps you to build full featured Node.js application without any further installation. Node.js core modules are loaded automatically when Node.js application starts. However, you have to import the required core module into your application first in order to use it.
Node.js Custom Modules