mongoose.connect('mongodb://localhost/test');
报错:
(node:2752) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead,
or set the `useMongoClient` option if using `connect()` or `createConnection()`.
See http://mongoosejs.com/docs/connections.html#use-mongo-client
解决:
mongoose.connect('mongodb://localhost/test',{useMongoClient: true});
手机扫一扫
移动阅读更方便
你可能感兴趣的文章