Async, Nodejs, Callbacks

From: Matt16 May 2020 21:35
To: Chris (CHRISSS) 2 of 3
Use async/await or Promises.

Although, if you've never used either before your head will probably hurt more than it does right now
From: Chris (CHRISSS)16 May 2020 21:48
To: Matt 3 of 3
Yup, that's exactly what I did in the end, and it works rather nicely,. Got a lambda/cognito authentication working in front of a static site.

Luckily I've done a little Nodejs before building a Google home task, but forgotten most of it. I had fun working out why a https post call's results weren't being used and it would reach the end of the script before the result came back. Promise/await fixed that one