37
From Mongoose JS documentation:
schema.post('save', function (doc) {
console.log('%s has been saved', doc._id);
})
Is there any way to determine whether this is the original save or the saving of an existing document (an update)?