Skip to content

Instantly share code, notes, and snippets.

@tocttou
Created August 21, 2016 18:34
Show Gist options
  • Select an option

  • Save tocttou/4e9e4722d5b4294f73d21792cf345307 to your computer and use it in GitHub Desktop.

Select an option

Save tocttou/4e9e4722d5b4294f73d21792cf345307 to your computer and use it in GitHub Desktop.
const fs = require('fs');
fs.readFile('./file1.json', (err, data) => {
if (err) {
console.log('cannot read file1.json');
} else {
console.log(JSON.parse(data).message);
console.log(process.env.MY_MESSAGE);
}
});
setTimeout(() => {
console.log('I was sleeping!');
}, 50000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment