express async handler code example
Example 1: npm express async handler
npm install --save express-async-handler
Example 2: expressjs4 async
app.post('/signup', async(req, res, next) => {
async function runAsync () {
await firstThing()
await secondThing()
}
runAsync()
.catch(next)
})