Created
August 18, 2018 04:56
-
-
Save xerosanyam/fd26fbdf9bd7716b54feec35481b77d5 to your computer and use it in GitHub Desktop.
write to file in node
This file contains hidden or 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
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