How to add data to the end of a file synchronously in Node.js?
Originally Published Here ๐!
To add to the end or append data to a file synchronously in Node.js, you can use the appendFileSync() synchronous function from the fs (filesystem) module.
/*๐ฅ Append data to a file ๐ฅ */
fs.appendFileSync("file.txt", "...
melvingeorge-me.hashnode.dev1 min read