What is the correct way of using Bluebird for Mongoose promises?
问题 I've been reading documentaion and articles and everyone seems to describe a different way about using Mongoose and Bluebird together. Even the official Mongoose documentation says something and Bluebird documentaion says another thing. According to Mongoose: mongoose.Promise = require('bluebird'); According to Bluebird: var Promise = require("bluebird"); Promise.promisifyAll(require("mongoose")); So to my understanding, if you pick the Mongoose way a sample query would be like: User.findById