Cannot connect to MongoDB database
I created a database in the mongodb instance and updated the mongodb connection string url with a /<database-name> but my app doesn't work, it doesn't connect to it. But it works fine if I remove the /<database-name>.
9 Replies
Project ID:
82b5df08-e6be-4a43-a8dd-ccc074549da1
82b5df08-e6be-4a43-a8dd-ccc074549da1
what package are you using to connect to the database, that is probably not how you specify the default database with the package you are using
mongoose, I will check the docs
seems to be fitting
Solution
That seemed to fix it, thanks
no problem!
just in case someone else runs into this, the
dbName
suggestion + removing the /<database-name
at the end of the connection string fixed it