const MongoClient = require('mongodb').MongoClient
var db
MongoClient.connect('mongodb://username:password@ds255588.mlab.com:55588/star-wars-quotes', (err, client) => {
if (err) return console.log(err)
db = client.db('starquotes')
app.listen(3000, () => {
console.log('listening on 3000')
})
})
运行以下代码时,我得到了MongoError: Authentication failed.
如何解决这个错误??!