Reading and Writing Files

Node's fs/promises module reads a whole text file with readFile, saves one with writeFile, adds to one with appendFile, and reports a missing file with the error code ENOENT, which your code can catch and explain.

By

Updated

Cheat sheet: Reading and Writing Files
Category
Node.js
Level
Apprentice
Tags
async/await in Node, ENOENT, fs Module, JavaScript, nodejs, text-encoding