R
Railway14mo ago
Michael

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
Percy
Percy14mo ago
Project ID: 5cbfb706-f70d-4814-9834-3f94646c5518
Michael
Michael14mo ago
5cbfb706-f70d-4814-9834-3f94646c5518
Fragly
Fragly14mo ago
did you use env.PORT for your port?
Michael
Michael14mo ago
No I just used 3000 hard coded
Fragly
Fragly14mo ago
You should use env.PORT then only works if you use the port railway provides
MantisInABox
MantisInABox14mo ago
If you used 3000 hard coded, set env variable of PORT to 3000 in your service
Fragly
Fragly14mo ago
oh you can do that?
Michael
Michael14mo ago
ok
MantisInABox
MantisInABox14mo ago
Yup
Fragly
Fragly14mo ago
is that new?
MantisInABox
MantisInABox14mo ago
Nope
Fragly
Fragly14mo ago
dang
MantisInABox
MantisInABox14mo ago
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
Michael
Michael14mo ago
so wait am I able to just not create a port variable on railway
MantisInABox
MantisInABox14mo ago
Yes, you can create an environment variable in your service and call it PORT and give it the value of 3000
MantisInABox
MantisInABox14mo ago
Like this
No description
Michael
Michael14mo ago
Okay thank you
Want results from more Discord servers?
Add your server