June 2022
Intermediate to advanced
410 pages
5h 8m
English
The previous chapter explained how npm can be used to find and install packages containing multiple JavaScript files, or modules. In this chapter, we’ll examine how modules are used in Node.js.
The information in this chapter is important, since you’ll encounter issues with older Node.js packages. However, all the packages referenced in this course have been tested for compatibility, so you can skip ahead and return when you eventually run into a problem!
Modules provide a way to define functionality in one file and use it in another. Developers often create encapsulated code libraries responsible for handling related tasks. The benefits include:
Read now
Unlock full access