(node) DeprecationWarning: collection.ensureIndex is …current URL …current Server Discovery…解决方法
(node:14912) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
(node:14912) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true
} to MongoClient.connect.
(Use node --trace-deprecation ...
to show where the warning was created)
(node:14912) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
解决方法: