Before writing Node.js applications, you must learn about Node.js modules and packages. Modules and packages are the building blocks for breaking down your application into smaller pieces.
In this chapter, we will cover the following topics:
So, let's get on with it.
Modules are the basic building block for constructing Node.js applications. A Node.js module encapsulates functions, hiding details inside a well-protected container, and exposing an explicitly declared list of functions.
We have already seen modules in action in the previous chapter. Every ...