wga is a small JS function which can wrap a generator or async function to used as request handlers and middlewares in Express. wga.js brought modern async write style to Express
npm install wga --save
var wga =var app =app
In the above example, the thrown error will be passed to
next, which in
Express's case calls the error handling middleware later on. If the generator succeeds, the
next callback will not be called.
If you need to, like in middleware handlers, you can always call