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
------数据库连接成功!------

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

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

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

http://blog.csdn.net/nvidiacuda/article/details/73457138

posted @ 2017-07-28 17:05  金于虎  阅读(639)  评论(0编辑  收藏  举报