Used for the user to actually download the text file. (creates a file to download) var fs = require("fs"); fs.writeFile("log.txt", process.argv[2], function(err) { if (err) { return console.log(err); } console.log("Success!"); });
Used for the user to actually download the text file.
(creates a file to download)
var fs = require("fs");
fs.writeFile("log.txt", process.argv[2], function(err) {
if (err) {
return console.log(err);
}
console.log("Success!");
});