I'm trying to connect like with mongodb, through the nest module. But when I pass the user and password parameters the connection is not made. But without the username and password parameters, a connection is made.
MongooseModule.forRoot('mongodb://username:pass!@127.0.0.1:22587/test')
ERROR [MongooseModule] Unable to connect to the database.
MongooseModule.forRoot('mongodb://127.0.0.1:22587/test')
LOG [InstanceLoader] MongooseModule dependencies initialized
The problem wasn't that I was passing the d parameters in the wrong place.
MongooseModule.forRoot('mongodb://127.0.0.1:22587',
{
user: dbUser
pass: dbPass
}
)