Tag archive for "mongoose"

Mongoose query by date

Looking at the code I'm really not sure how it could have taken me more than one minute to figure this out.. but here's an example how to query for documents with a timestamp in the past. Your model's schema obviously needs a timestamp field of the Date type, and ... more

Modifying mongoose query objects

Mongoose is quite easy to use, but modifying or annotating a query result manually is a little tricky. The problem is that the result objects are mongoose documents that can't be modified at will. In my case I was trying to change a Date type field to a human readable ... more