#mongodb
31 messages · Page 1 of 1 (latest)
.
@hidden spruce mongodb://mongo:[code]@containers-us-west-91.railway.app:[morecode]
mongoose.connect('mongodb://mongo:[code]@containers-us-west-91.railway.app:[morecode]', {
useNewUrlParser: true,
})
const db = mongoose.connection
db.on('error', error => console.error(error))
db.once('open', () => console.log("Connected to mongoose"))
MongoNetworkError: failed to connect to server [containers-us-west-91.railway.app:27017] on first connect [MongoNetworkTimeoutError: connection timed out
it's actually giving failed to connect error
@thorn rivet
Does using that URL locally work?
@hidden spruce nope
Not sure then sorry. Not used mongo. Altho whever connection issues come up here it's usually the users code so maybe Google around for mongo stuffs
Yeah Im trying. Thanks tho
@hidden spruce is it possible that I need to whitelist my IP?
Nope
Not used mongo on railway but Ive never heard anything like this
Have you tried deploying the service on railway?
Yeah but I don't wanna use up more free resources
ok wait it works locally now
It seems there was a typo in the url
im so stupid 😣
but it's still not working on heroku
😆 rip
Time to ditch heroku
Sounds good
hey I just deployed on railway
how do I see the url of my app
lol sorry if that's dumb
ok got it I had to generate a domain
THANKS a lot dude you really helped
I'm not sure I did. But your welcome lol 👍