April 2020
Beginner
192 pages
3h 15m
English
In programming, modules are self-contained units of functionality, which can be shared and reused across projects. They make our lives as developers easier, as we can use them to augment our applications with functionality that we haven’t had to write ourselves. They also allow us to organize and decouple our code, leading to applications that are easier to understand, debug and maintain.
In this guide, I’ll examine how to work with modules in Node.js, focusing on on how to export and consume them.
As JavaScript originally had no concept of modules, a variety of competing formats have emerged over time. Here’s a list of the main ones to be ...