I have the code:
async function getUrl() { let url = await ngrok.connect(3000) return url } let url = await getUrl()
. I get an uncaught error on the last line. What am I doing wrong? the url variable in both are showing string.
CodePudding user response:
You don't call it with the await keyword.
Rewrite your code as follows:
async function getUrl() { let url = await ngrok.connect(3000) return url }
let url = getUrl()