Skip to content

Instantly share code, notes, and snippets.

@BRELID
Last active July 24, 2019 13:20
Show Gist options
  • Save BRELID/e243f8941d1346069bf97b78edea626d to your computer and use it in GitHub Desktop.
Save BRELID/e243f8941d1346069bf97b78edea626d to your computer and use it in GitHub Desktop.
Append content in file with NodeJS
var fs = require("fs");
content = "New content"
fs.appendFile("log.txt", content+"\r\n", (err) => {
if (err) console.log(err);
console.log("Successfully append to File.");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment