R
Railwayβ€’13mo 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β€’13mo ago
Project ID: 24229b64-e963-4d48-8c97-2f4befd0cf5d
Brody
Brodyβ€’13mo 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 RecareyOPβ€’13mo ago
When you say having my tcp proxy enable, you mean connecting to it via public URI, right?
Brody
Brodyβ€’13mo ago
correct
Richy Recarey
Richy RecareyOPβ€’13mo 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β€’13mo 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 RecareyOPβ€’13mo ago
Okay, thank you so much! πŸ™‚
Brody
Brodyβ€’13mo ago
no problem!
Want results from more Discord servers?
Add your server