Creating and appending files in the File System module

To kick things off though, we will start with the File System module. We'll go through the process of creating a file and appending to it:

When you view a docs page for a built-in module, whether it's File System or a different module, you'll see a long list of all the different functions and properties that you have available to you. The one we'll use in this section is fs.appendFile.

If you click on it, it will take you to the specific documentation, and this is where we can figure out how to use appendFile, as shown in the following screenshot:

Now, appendFile is pretty simple. We'll ...

Get Learning Node.js Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.