Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么猫鼬没有连接到 MongoHQ 我正在使用给定的 URL
mongoose.connect('mongodb://' + user + ':' + pass + '@' + host + ':' + port + '/' + name)
它不报告任何错误,但数据库没有任何变化
如果你想让它报告错误,你必须处理错误情况。
mongoose.connect('mongodb://' + user + ':' + pass + '@' + host + ':' + port + '/' + name', function(err) { if (err) throw err; });