var fs = require('fs'); //Replace the file with a new one: fs.writeFile('mynewfile3.txt', 'This is my text.', function (err) { if (err) throw err; console.log('Replaced!'); }); // You can write anything in this file by using writeFile() function

var fs = require('fs'); //Replace the file with a new one: fs.writeFile('mynewfile3.txt', 'This is my text.', function (err) { if (err) throw err; console.log('Replaced!'); }); // You can write anything in this file by using writeFile() function