New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connect to mongodb / documentDB #14535
Comments
Can you post the code you're trying to run to connect to the document DB? |
` const DBConnect = () => module.exports = DBConnect; DB_URL: mongodb://:@<CLUSTER_NAME>:<CLUSTER_PORT>/<DB_NAME> |
And how are you importing and running DBConnect() ? |
@rakshitweb Is this a protected DB? Because in that case you will also need to add password to the url connection string, otherwise you won't be to connect to it |
@rakshitweb https://www.mongodb.com/docs/manual/reference/connection-string/ here you have some more information about mongodb connection strings if you need it |
Prerequisites
Mongoose version
^8.0.2
Node.js version
20.9.0
MongoDB version
5.0.0
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
10
Issue
I am not able to connect to document DB using mongoose.
I am able to connect to the same using mongo shell, and compass.
Getting this error: Failed to connect with Mongo DB MongooseServerSelectionError: connect ETIMEDOUT
The text was updated successfully, but these errors were encountered: