Created
August 21, 2016 18:34
-
-
Save tocttou/4e9e4722d5b4294f73d21792cf345307 to your computer and use it in GitHub Desktop.
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
| 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