Break your Node.js application into smaller files that can be organized, reused, and maintained independently.
Modules let you split a Node.js application into separate pieces instead of putting everything into one large file. Each module can expose functionality for other parts of the application while keeping its own implementation details private.
Node.js supports both the CommonJS module system and modern ECMAScript modules. Understanding require, module.exports, import, export, and the differences between these systems is important because real Node.js projects may use either one.
What you'll walk away knowing