These are chat archives for Automattic/mongoose

15th
Sep 2016
Sabya
@sabyamon
Sep 15 2016 01:09
Hi All , pretty new to mongoose .. I am trying to query a collection with some limit and offset (skip) .. Somehow I am not able to achieve that .. Would add the code here .. Will be really helpful if I can get some help .. SOF and googling directed me the same things ..
var offset = req.params.offset;
var rLimit = req.params.limit;
Events.find({}, {skip: 0, limit: 3}, function (err, events) {
if (err) {
res.json({status: 500 , message: 'Internal Server Error in Dhondhu ..'});
} else {
res.send(events);
}
});
spatil79
@spatil79
Sep 15 2016 15:47
Facing weird error while trying to connect to mongo from node server on AWS instance.. issue -> http://stackoverflow.com/questions/39513767/node-mongodb-error-no-valid-replicaset-instance-servers-found
can someone point me in right direction to investigate the root cause
realisation
@realisation
Sep 15 2016 23:38
hi folks, I had a really confusing problem just a little bit ago
I was finding some records, and they have a property that's an array of objects. but when I tried to access an element in that array, it turned out to be undefined
even though when I console.logged the property with that array, the array printed out -- I just couldn't access any particular element directly, and it also failed when repeated over in my jade template
realisation
@realisation
Sep 15 2016 23:49
any idea why? this is the first time I've encountered anything like this