Last active
October 9, 2017 13:15
-
-
Save rafaelmaeuer/6170c7b5c5afae0fbc5cb4872a404397 to your computer and use it in GitHub Desktop.
NodeJS write log file (Json) - From https://stackoverflow.com/questions/25305622/nodejs-write-log-file-json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fs.appendFile('message.txt', 'data to append', function (err) { | |
if (err) throw err; | |
console.log('The "data to append" was appended to file!'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment