(node:3341) DeprecationWarning: Mongoose: mpromise

后端 未结 8 1857
忘了有多久
忘了有多久 2020-11-27 11:19

I\'m trying to develop a class on the top of the mongoose with my custom methods, so I extended the mongoose with my own class but when I invoke to create a new car method i

8条回答
  •  难免孤独
    2020-11-27 11:50

    Just add the second parameter as an object to the connect() method.

    mongoose.connect('dbUrl', {
      useMongoClient: true
    });
    

    See: http://mongoosejs.com/docs/connections.html#use-mongo-client

提交回复
热议问题