See the written version of this tutorial for links to prerequisites and related tutorials: https://heynode.com/tutorial/use-asyn...
If promises are like a yield sign, JavaScript’s await function modifier is a stop sign. To write asynchronous code in Node.js in a way that reads like synchronous code, we can use the async/await JavaScript keywords. Sometimes you want a logical flow to wait for something to complete without blocking the Node process, and only then move on to the next line. Async/await are relatively new features, available in Node.js v7.6 and up. The basic idea behind async/await is to write asynchronous code that looks and behaves similarly to synchronous code. Code that will be executed in the order it was written.
In this tutorial you'll learn:
What the JavaScript async/await function modifiers do
How to use async/await with Promises in Node
How to handle errors with async/await
Heynode.com: The best online Node.js courses and tutorials to help you solve hard problems fast.