#Issue with Mongo Replica

4 messages · Page 1 of 1 (latest)

frail karma
#

@upbeat kayak - You either have one node, and use the replicaSet=X or you have multiple nodes with the different IPs. You can't have both.

upbeat kayak
#

That is a good catch @frail karma, however the string above seems to work fine outside of NestJS ie. when using new Mongoose().connect(url). FWIW, removing the param from the URL is still causing the same problem Unable to connect to database.. This is definitely a NestJS issue.

frail karma
#

@upbeat kayak - It can't be a Nest problem, because Nest is just wrapping Mongoose. The URL is given straight to Mongoose. Make sure it is commas separating the node addresses. It seems like they are dots. And, if that isn't the problem, can you show me your module code, where you use forRootAsync?