Skip to content

Instantly share code, notes, and snippets.

@ricardobeat
Forked from alanhoff/gist:5366411
Last active December 16, 2015 02:59
Show Gist options
  • Save ricardobeat/5366640 to your computer and use it in GitHub Desktop.
Save ricardobeat/5366640 to your computer and use it in GitHub Desktop.
var async = require('async')
models = [model1, ...]
async.map(models, function(model, next){
model.count().exec(next)
}, function(err, count){
res.render('painel/info', {
title: 'Informações',
subtitle: 'Geral',
menuativo: 'info',
numeros: count
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment