Skip to content

Instantly share code, notes, and snippets.

@liushuaikobe
Created May 7, 2014 08:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liushuaikobe/6b4db6c929ec0440ab9a to your computer and use it in GitHub Desktop.
Save liushuaikobe/6b4db6c929ec0440ab9a to your computer and use it in GitHub Desktop.
v2ex_node
function(req, res, db) {
db.collection("location").count(function(err, location_count){
db.collection("actor").count(function(err, actor_count){
db.collection("record").count(function(err, record_count){
res.json({
location_count: location_count,
actor_count: actor_count,
record_count: record_count
});
});
});
});
};
@jekku
Copy link

jekku commented Oct 27, 2015

Horrible implementation. Use promises.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment