In this segment, you will look at some other packages in Node and also learn about different types of modules/packages in Node.
Let's now discuss core modules and how you can see the lists of all the core modules in Node.
In the video above, you came across another type of module, known as the core module. Now let's discuss one of the core modules which is the 'fs' module.
In the last video, you came across the fs module, which stands for file-system. This module provides the capability of the local file management system.
Before moving on to the fs module, let's first look at the different types of modules/packages in Node.
In this segment, you learnt the following facts:
There are three types of modules/packages in Node.js:
A. Custom modules/packages: These modules/packages are created and defined by the user; there is no need to install a custom module. However, you need to use the require function to import a custom module by giving its path to start using it.You can see the list of all core modules using the following statement:
console.log(require('module').builtinModules);
fs is a core module standing for file-system. This module provides the local file system management capability to Node.js, which is one of the factors that differentiates Node (server-side JavaScript) from client-side JavaScript.
In the next segment, you will learn more about the fs module and its APIs.