Create Files in Node.js File System Module

In this tutorial, you will learn how to create files in Node.js file system and it is very simple. There are some built-in methods by which we can do so. So, follow the below methods in a step-by-step process. fs.appendFile():- This method will help us to create a file and appends some contents inside that … Read more

How To Read a file in Node JS

In this tutorial, you will learn how to read a file in Node JS. In order to do this, you have to include a built-in module of Node JS known as fs( File System) with the help of require() method as shown below var fs = require(“fs”);fs.readFile(“name of the file”,”encoding”,”function(err,data)) Please note that the readFile() … Read more