Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Factory method to create async functions that propagate errors properly on express, sails apps. It uses yortus async/await

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages