Skip to content

Instantly share code, notes, and snippets.

@xerosanyam
Created August 18, 2018 04:56
Show Gist options
  • Save xerosanyam/fd26fbdf9bd7716b54feec35481b77d5 to your computer and use it in GitHub Desktop.
Save xerosanyam/fd26fbdf9bd7716b54feec35481b77d5 to your computer and use it in GitHub Desktop.
write to file in node
var fs = require('fs');
fs.writeFile("list.js", JSON.stringify(list), function(err) {
if(err) {
return console.log(err);
}
console.log("The file was saved!");
});
const TEMP = require('./temp.js')
// temp.js has
exports.emails = ['a','b']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment