Created
May 7, 2014 08:00
-
-
Save liushuaikobe/6b4db6c929ec0440ab9a to your computer and use it in GitHub Desktop.
v2ex_node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
}); | |
}); | |
}); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Horrible implementation. Use promises.