Tiny Mongoose walkthrough that models a simple university example and demonstrates two ways to compute an average: an instance method on the document and a MongoDB aggregation pipeline.
git đ https://github.com/dupontdenis/mongoose-agregation.git