Thank you, Joe! So, since I’m really only sorting from highest to lowest, I was able to find a simpler way to go about this using the following approach in the controller file. The big different being the use of .sort vs. using the aggregation pipeline. Names of the variable have changed from the original example, but same principal.
exports.getTopShips = async (req, res, next) => {
const topShips = await Ship.find().sort({ ratingsAverage: -1 });
res.status(200).render('topRated', {
title: `Top Ships`,
topShips,
});
};