node js + create and write a file code example
Example 1: fs create or edit file
//Edit file or creates if doesnt exist
const fs = require('fs');
fs.appendFile(‘<fileName>’,<content>,callbackFunction)
Example 2: writefile in node js
fs.writeFile('2pac.txt', 'Some other lyric', 'ascii', callback);