Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const fs = require('fs')
- const util = require('util')
- const readFile = util.promisify(fs.readFile)
- readFile('./test/test.md', 'utf8')
- .then(text => {
- console.log(text)
- })
- .catch(err => {
- console.log('Error', err)
- })
Add Comment
Please, Sign In to add comment