Suppose I have a collection in my mongoDB: db.co
and only have one document:
{ \"_id\" : ObjectId(\"50d083e32cdcf7ce065b616c\"),
\"age\" : 22
I notice your callback to find() has the following parameters : err, doc
find() always returns an array so you really want this to be : err, docs
OR use findOne()
The async stuff shouldn't be a problem in the code you've posted, the nested callbacks will still be executed. Are you sure your connection is OK. I would run an open query :
Co.find({}, function(err, docs){
console.log(docs);
}
Just to check the collection has something in it