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