Web Server Not Working
I just started a small simple web server. I generated a custom domain for now, and when trying to access it I'm being met with Application failed to respond
17 Replies
Project ID:
5cbfb706-f70d-4814-9834-3f94646c5518
5cbfb706-f70d-4814-9834-3f94646c5518
did you use
env.PORT
for your port?No I just used 3000 hard coded
You should use
env.PORT
then
only works if you use the port railway providesIf you used 3000 hard coded, set env variable of
PORT
to 3000
in your serviceoh you can do that?
ok
Yup
is that new?
Nope
dang
It's better to listen on the port provided, but if you specify it in your code or if it's a docker image, you can set it manually
so wait am I able to just not create a port variable on railway
Yes, you can create an environment variable in your service and call it
PORT
and give it the value of 3000
Like this
Okay thank you