I\'m working with Mongoose. I have seen a lot of developers make the following command:
mongoose.Promise = global.Promise;
Then I was curi
Mongoose maintainer here. If you're using Mongoose 5, please remove mongoose.Promise = global.Promise;. That line was used to address the below deprecation warning with promises in Mongoose 4:
WARNING: Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your own promise library instead
It does nothing in Mongoose 5. You should only use mongoose.Promise in Mongoose 5 if you want to use your own promise library with Mongoose, like Bluebird or Q.
There's also a little more about mongoose.Promise here: https://masteringjs.io/tutorials/mongoose/promise#the-mongoosepromise-property