I am trying to connect to Atlas using NodeJs.
My code is as below.
It gives me timed out error in Compass.
In the code, it gives me the following error.
“Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you’re trying to access the database from an IP that isn’t whitelisted. Make sure your current IP address is on your Atlas cluster’s IP whitelist: https://docs.atlas.mongodb.com/security-whitelist/”
I have whitelisted the ip address 0.0.0.0/0 so that it can be accessed from every where.
Can you please guide me what is wrong here?