R
Railway•8mo 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•8mo ago
Project ID: N/A
Brody
Brody•8mo ago
I assume you may have changed the database name?
lasse
lasse•8mo 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•8mo ago
have you changed anything service variables wise?
lasse
lasse•8mo ago
I works now, by removing the "/test"
Brody
Brody•8mo ago
is this mongoose?
lasse
lasse•8mo ago
Yes
Solution
Brody
Brody•8mo ago
you need to specify the database name in the options object
lasse
lasse•8mo ago
Alright thanks brody 👌
Want results from more Discord servers?
Add your server