关于nodejs 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.
时间:2018-07-25 10:14:32
收藏:0
阅读:5821
const mongoose = require(‘mongoose‘)
mongoose.connect("mongodb://localhost:27017/study", {useNewUrlParser:true}, function(err){
if(err){
console.log(‘Connection Error:‘ + err)
}else{
console.log(‘Connection success!‘) }
})
原文:https://www.cnblogs.com/TomAndJerry/p/9363951.html
评论(0)