In case you missed it, Node now supports async/await out of the box since version 7.6. If you haven’t tried it yet, here are a bunch of reasons with examples why you should adopt it immediately and never look back.
[EDIT]: It seems that the embedded code on gist does not work on medium native app, but it works on mobile browsers. If you are reading this on the app, tap on the share icon and choose “open in browser” in order to see code snippets.
For those who have never heard of this topic before, here’s a quick intro
... read the whole story at medium.com.
- Async/await is a new way to write asynchronous code. Previous options for asynchronous code are callbacks and promises.