How to get Port as Env var?
I basically want to pas in the dynamic port of my service as an environment var, dont see info on that in docs, only for TCP proxy
8 Replies
Project ID:
N/A
N/A
The port environment variable is automatically generated, but if you want to create one specifically for a particular port just set an environment variable in your service called
PORT
to your desired port numberThanks for the response.
To clarify, I want to know what Railway;s dynamic port is
so I can remap it to an app specific env var
It will tell you when you deploy the service in the deploy log
It would just be
PORT
so in my env var I would do
VAR_NAME = ${PORT}
Yes
Thank you 🙂