a year ago
Hi!
I'm trying to connect a front end app with a server using private networking but I don´t know whats the port due there is no variable PORT given by you (Railway).
Here's other thread where "you give the solution" but given link does not work
https://help.railway.com/questions/how-do-i-use-private-networking-with-rai-65fa14c1
Could you help me with this?
6 Replies
brody
Is this a client side rendered frontend app?
a year ago
Hi!
No, it is a SSR app. To be more specific is a sveltekit app. I need to know the port of my api server to connect them, but I don’t know what this is.
a year ago
The port is whatever your app is listening on, but ideally this would be $PORT (8080)
Check out this docs section for how to do this following best practices -
https://docs.railway.com/guides/private-networking#using-reference-variables
a year ago
I think I get it. My API can receive a PORT variable which is set by Railway on deployment. Is this PORT I need for private networking? Is there an environment variable to fetch this?
brody
I think the docs section I linked covers your questions!
a year ago
Hahahahaha ok...I really appreciate your help and disposition for it (not really)
Status changed to Solved brody • over 1 year ago
