async-handler
v0.0.3
Published
Creates wrapper fns that use yortus async/await internally, to be used with express or sails route handlers / actions
Downloads
899
Maintainers
Readme
async = require('asyncawait/async')
await = require('asyncawait/await')
asyncHandler = require('async-handler')(async, await)
HomeController =
index: asyncHandler((req, res) ->
await newsWidget(req, res)
await videosWidget(req, res)
await magazinesWidget(req, res)
await galleriesWidget(req, res)
view = await res.renderAsync('homepage')
res.send(200, view)
return view
).cacheFor(20000)