File System

Learn how to use the file system to handle files.

Using the file system module to handle files will be one of the key aspects of your build tool. Luckily, this comes out of the box with Node. You will most likely have to read in data from configuration files, write new, or update existing files.

With the projects that I have worked on, there was a configuration file in the JSON format wherein some of the values needed to be replaced. I needed to update the ID, the date range, what service requests to call, and so on. Here is a watered-down example of a configuration file for a game campaign.

Get hands-on with 1400+ tech skills courses.