Hi, New Node.js programmer here. I was trying to do:module.exports ={async getFileAsString(path){ if (!path) { throw "No Path Provided!"; } let file = await fs.readFile(path,'utf8'); return file; }}but I keep getting an Unexpected Identifier error pointing to getFileAsString(path). Can someone explain why this is giving me an error and how I can fix it?
Submitted September 24, 2017 at 08:20AM by karuaan
No comments:
Post a Comment