Skip to content

Instantly share code, notes, and snippets.

@vdespa
Created April 11, 2018 11:26
Show Gist options
  • Save vdespa/f71de898415af5e3a2aa2a7bdfd02cbe to your computer and use it in GitHub Desktop.
Save vdespa/f71de898415af5e3a2aa2a7bdfd02cbe to your computer and use it in GitHub Desktop.
Write file to disk
const fs = require('fs');
fs.writeFile(`foo.txt`, 'bar', function (error) {
if (error) { 
console.error(error); 
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment