How to append content in a file?

What is appendfile() function? We can also use the fs module to append the content using appendFile function into a file. However, appendFile function will create the file if the file doesn’t exist or append the content into the file, if the file already existed. Let’s create a folder structure […]

What is Require function & how to export custom module?

In Node.JS, Every JavaScript file is its own module and So far we have been loading module using the require function. What is Require function? The require function is the part of common JavaScript module. But it is only half part and the other half of the part is module.exports […]

What and how to use Readline?

Readline is a core module of NodeJS that is available to us without having to install anything other than NodeJS. It can be used ask/read data of a terminal user. Suppose we are creating an application that would ask questions from a terminal user. It is an interface where we […]