R
Railway•9mo ago
lasse

MongoDB connection issues

So when ever i try to connect to my database, i get this error. It worked before with my local database. But wanna have it on railway. I just straigt copied the url from the railway dashboard.
No description
Solution:
you need to specify the database name in the options object
Jump to solution
9 Replies
Percy
Percy•9mo ago
Project ID: N/A
Brody
Brody•9mo ago
I assume you may have changed the database name?
lasse
lasseOP•9mo ago
I have set it to "test" wich already exist in it
MONGO_URL="mongodb://<user>:<pass>@<host>:<port>/test"
MONGO_URL="mongodb://<user>:<pass>@<host>:<port>/test"
Brody
Brody•9mo ago
have you changed anything service variables wise?
lasse
lasseOP•9mo ago
I works now, by removing the "/test"
Brody
Brody•9mo ago
is this mongoose?
lasse
lasseOP•8mo ago
Yes
Solution
Brody
Brody•8mo ago
you need to specify the database name in the options object
lasse
lasseOP•8mo ago
Alright thanks brody 👌
Want results from more Discord servers?
Add your server