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
Percy
Percy2y ago
Project ID: 82b5df08-e6be-4a43-a8dd-ccc074549da1
hermeschi
hermeschiOP2y ago
82b5df08-e6be-4a43-a8dd-ccc074549da1
Brody
Brody2y ago
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
hermeschi
hermeschiOP2y ago
mongoose, I will check the docs
hermeschi
hermeschiOP2y ago
seems to be fitting
Solution
Brody
Brody2y ago
hermeschi
hermeschiOP2y ago
That seemed to fix it, thanks
Brody
Brody2y ago
no problem!
hermeschi
hermeschiOP2y ago
just in case someone else runs into this, the dbName suggestion + removing the /<database-name at the end of the connection string fixed it
Want results from more Discord servers?
Add your server