Skip to content

Instantly share code, notes, and snippets.

@ajduke
Created January 24, 2016 06:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajduke/20aafb6a9554f4b11307 to your computer and use it in GitHub Desktop.
Save ajduke/20aafb6a9554f4b11307 to your computer and use it in GitHub Desktop.
fs = require("fs");
path = "myfile.txt";
data = "This content is written from Node program";
fs.writeFile(path, data, function(error){
if error
console.error("error: " + error.message);
else
console.log("Successful Write to " + path);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment