Https is a built-in module. It needs to start the creates a server object to listen and send the requests from the client-side on a specific server port and path. It parses a header and body message when the req.end() function call.
We can customize or send the raw headers and also set HTTP Status codes. This module supports the Events as if the user connects or abort to the server than we can run a callback function when the event fire.
2- File system
It is a module to interact with the file system of your computer or a server. Common uses Create, Write, Read, Delete and Rename of the files.
The filesystem work with asynchronous and synchronous operations. Use asynchronous operation otherwise if we use synchronous operations on a server which have thousands of clients. It won’t work properly because NodeJS has a single thread.
Events is one of the core modules of NodeJS. Every action on the computer is an event. When the user double click on the file than event fire and this event open the file. In the same way in NodeJS Events on asynchronous event-driven architecture in a certain type of object called emitter. Emit named event function that causes the object called the listener.
OS module gets information about the operating system. We can check the total memory and available free memory of your system. It’s monitor the server resources for the powerful tasking.
We can arrange the events and tasks according to server performance. We can also get many reports like load avg, uptime etc.
Path module gives a way of working with the files and directories. First of all, We create an object to get information about the files and directories. basename(), dirname(), Join() etc. These functions return the data about the file or a directory.
This module allows us to stream the data. There are mainly three types of streams. readable, writeable and duplex streams. But the nodejs provide the readable and writeable streams.
Readable streams allow us to read the data from the stream and writeable stream allow to write the data from the streams.