R
Railwayβ€’12mo ago
Richy Recarey

Connect to mongodb in local over private network

Hi, is it possible to connect to my mongodb service over private network in local, while developing? Project ID: 24229b64-e963-4d48-8c97-2f4befd0cf5d
8 Replies
Percy
Percyβ€’12mo ago
Project ID: 24229b64-e963-4d48-8c97-2f4befd0cf5d
Brody
Brodyβ€’12mo ago
not currently possible, from what I've heard this is in the works. for now you would need to have the tcp proxy enabled
Richy Recarey
Richy Recareyβ€’12mo ago
When you say having my tcp proxy enable, you mean connecting to it via public URI, right?
Brody
Brodyβ€’12mo ago
correct
Richy Recarey
Richy Recareyβ€’12mo ago
So, if someone wants to connect over private network on the deployed service, but over public network locally, I guess I have to have different env variables for local and for the app itself. In other words, I cannot just use railway run ..., right? 😦
Brody
Brodyβ€’12mo ago
you would have to have a public uri and a private uri variable on the service, then your code would need to dynamically determine the environment and what uri to use in what environment, once you do that you can totally use railway run
Richy Recarey
Richy Recareyβ€’12mo ago
Okay, thank you so much! πŸ™‚
Brody
Brodyβ€’12mo ago
no problem!
Want results from more Discord servers?
Add your server