(node:29576) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To us
e the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
(node:29576) 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 Mo
ngoClient constructor.
当我们在连接数据库的时候出现这个问题就需要我们对数据库的连接进行配置
mongoose.connect('mongodb://localhost/shop',{ useNewUrlParser : true, useUnifiedTopology: true})
// 连接数据库对象