Welcome back.
In this video, let's get started with Node.js modules.
What is it and why do we care about.
So let me explain more about Node.js modules.
Oh, right.
Node.js modules are a key part of the way that Node.js works, and it provides a way to break up our
code into small reusable pieces.
So modules also provide a way to share code between different applications.
So it simply means that it's a way of reusing our code or break our code into small pieces to make it
more readable.
And apart from this one.
There are a few different types of modules, but the two most common ones are the core modules, meaning
modules that are shaped with Node.js.
Then second type is called third party modules, and that is third party modules are the modules that
we installed for a package manager like and PMM.
So the foundation of Node.js depends on the module.
So take modules as a function that has been built into the Node.js ecosystem.
So it is our responsibility to go in and use the modules that Node.js has provided us to build our application.
So let's say that we want to create a server.
Definitely we need a module from Node.js ecosystem to do that.
So we have core modules and then third party modules.
So let me show you a sample of the core modules.
So if you go to new GS dot org, this is our official website.
And then if you click on documentation on the left side here, we have different documentations based
on the version of your Node.js.
If want to read documentation by ESX and beyond, click on that.
And if we want to read documentation on the latest version, click on that or this.
So depending on the version of your Node.js.
So let's click on any of this one thing.
We downloaded the latest version.
So let's click on this 18 .7.0, click on that.
And now you see that on the left side here.
These are the core modules Node.js has given to us that's going to make our life easier by saying that
there's so much here.
That is why we have third party modules from NPM.
So NPM here is a community that provide additional modules, which is not part of the core modules of
Node.js.
So let's stick to the core modules first.
As you move on, get back to experts.
I will show you how we can use third party modules as well.
So let's forget about NPM for now.
And we are going to spend all our life on NPM because sometimes you may need some modules where it's
not part of the core models of Node.js unless we come here and then we install it.
So for now, let's close and PM.
Perfect.
So on the left side here, we are going to talk about few of these modules and after that at a free
time you can read more, for example, if you want to work with a file system so you go to FS.
So these modules have been arranged in the alphabetical order.
So first system, if you click on that, these are documentation about the file system.
So in this video, let's get started with the first module called file system and let's see what this
module can help us or can do for us in the next video.