Answer the question
In order to leave comments, you need to log in
How to connect to mlab correctly?
I'm trying to connect to m lab
I'm writing
mongoose.connect('mongodb+srv://Yri:***@cluster0-0n7so.mongodb.net/test?retryWrites=true&w=majority', {useMongoClient: true});
[Error: Invalid mongodb uri "mongodb+srv://Yri:[email protected]/test?retryWrites=true&w=majority". Must begin with "mongodb://"]
[nodemon] app crashed - waiting for file changes before starting...
{ [MongoError: failed to connect to server [cluster0-0n7so.mongodb.net:27017] on first connect [MongoError: getaddrinfo ENOTFOUND cluster0-0n7so.mongodb.net cluster0-0n7so.mongodb.net:27017]]
name: 'MongoError ',
message: 'failed to connect to server [cluster0-0n7so.mongodb.net:27017] on first connect [MongoError: getaddrinfo ENOTFOUND cluster0-0n7so.mongodb.net cluster0-0n7so.mongodb.net:27017]' }
[nodemon ] app crashed - waiting for file changes before starting...
Answer the question
In order to leave comments, you need to log in
you have some strange link to mlab, I have ALL links to mlab of this kind
mongodb://USER:[email protected]:29780/DBNAME
link from here?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question