-
-
Save charlenetshos/733f4b96c4a38d89b55279bbbeb123cb to your computer and use it in GitHub Desktop.
Synchronous Node
This file contains 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'); | |
console.log('About to read file content'); | |
try { | |
let content = fs.readFileSync('random-file.md', 'utf-8'); | |
console.log('Done reading file'); | |
console.log(content); | |
} catch (err) { | |
console.log(err); | |
} | |
console.log('Node.js is based on JS.'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment