Modules in Node.js

Modules are otherwise called as packages in Node.js. Module is a collection of one or more JavaScript files to serve complex functionality. There are 3 types of modules:

  1. Core/Built-in module – One of the module is HTTP.
  2. External/Third-Party module.
  3. User-defined module.

Consider we have created a Spring RESTful web application using Spring Boot. We can use Node’s HTTP module to send all types of HTTP requests and receive responses — no need to add any third-party module to our Node application.

Modules in Node.js
Modules are otherwise called as packages in Node.js. Module is a collection of one or more JavaScript files to serve complex functionality. There are 3 types of modules:

Core/Built-in module – One of the module is HTTP.
External/Third-Party module.
User-defined module.

Consider we have created a Spring RESTful web application using Spring Boot. We can use Node’s HTTP module to send all types of HTTP requests and receive responses — no need to add any third-party module to our Node application. […]