Created
March 27, 2018 21:44
-
-
Save geopet/3e49aefdff219e05426d5cd1d008e034 to your computer and use it in GitHub Desktop.
Just a very basic node document writing script
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
console.log('Starting app.'); | |
const fs = require('fs'); | |
const os = require('os'); | |
const user = os.userInfo(); | |
fs.appendFile('greetings.txt', `Hello, ${user.username}.`, function(err) { | |
if (err) { | |
console.log('Unable to write to file'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment