I'm trying to call the makePassword
method into the UserSchema.pre('save')
. but get this error
(node:8252) DeprecationWarning: Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your own promise library instead: http://mongoosejs.com/docs/promises.html
I've also tries with including the mongoose.Promise = global.Promise;
before mongoose.connect(config.database);
, Please suggest