mongoose连接报错

(node:12276) 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
(node:12276) DeprecationWarning: Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your own promise library instead: http://mongoosejs.com/docs/promises.html
------数据库链接成功!------html

解决
仍是能出来结果的,只不过是版本更新了,链接方式有变。node

mongoose.connect('mongodb://127.0.0.1:27017/test',{useMongoClient: true});//链接数据库

http://blog.csdn.net/wflk_wangwei/article/details/76176965mongodb

http://blog.csdn.net/nvidiacuda/article/details/73457138数据库

相关文章
相关标签/搜索