Server Discovery And Monitoring engine is deprecated

后端 未结 23 1181
执笔经年
执笔经年 2020-12-01 00:54

I am using Mongoose with my Node.js app and this is my configuration:

mongoose.connect(process.env.MONGO_URI, {
   useNewUrlParser: true,
   useUnifiedTopol         


        
23条回答
  •  無奈伤痛
    2020-12-01 01:12

    if you used typescript add config to the MongoOptions

    const MongoOptions: MongoClientOptions = {
      useNewUrlParser: true,
      useUnifiedTopology: true,
    };
    
          const client = await MongoClient.connect(url, MongoOptions);
    
    if you not used typescript  
    const MongoOptions= {
      useNewUrlParser: true,
      useUnifiedTopology: true,
    };
    

提交回复
热议问题