Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Append text into a file nodejs

const fs = require('fs');

fs.appendFile('message.txt', 'data to append', function (err) {
  if (err) throw err;
  console.log('Saved!');
});

If message.txt doesnt exist, It will gonna create that too
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Append #text #file #nodejs
ADD COMMENT
Topic
Name
1+2 =