I have NodeJs app on the Namecheap server. Mongo db is hosted on MongoLab. When trying to connect to the database with mongoose I'm getting the following error: Mongoose connection "error" event fired with: { MongoError: no primary found in replicaset
MONGO_URI=mongodb://username:[email protected]:27017,cluster0-shard-00-01-0dwia.mongodb.net:27017,cluster0-shard-00-02-0dwia.mongodb.net:27017/test?ssl=true&replicaSet=Cluster0-shard-0&authSource=admin&retryWrites=true&w=majority
Mongo: 4.0.12 Node: v9.11.2
I am able to connect to the database with the same url from my local machine. Does someone know what could be the issue?