R
Railway2y ago
Medim

Listening on PORT but application not serving

Hi there! My app is listening on port 8055 as defined in the app .env I ran railway up and it built my project flawlessly. But heres the catch : How can i redirect railway to port 8055?? When i access my railway.app url it gives me the Is your app correctly listening on $PORT? but what does it mean? where do i put this thonking
8 Replies
JustJake
JustJake2y ago
Either listen on PORT or set PORT=8055 in variables
angelo
angelo2y ago
^ Railway will try it's best to guess what port your application is running on but you may have to provide that value yourself. See here: https://docs.railway.app/deploy/exposing-your-app
Railway Docs
Exposing Your App | Railway Docs
Documentation for Railway
Medim
Medim2y ago
Already did create a PORT=8055 in variables, nothing changed
JustJake
JustJake2y ago
What frameowkr are you using?
Medim
Medim2y ago
Directus
JustJake
JustJake2y ago
If you're listening on 127.0.0.1 can you try to listen on 0.0.0.0?
angelo
angelo2y ago
You mention it's in your .env, is it in the service vars? Also, you may need to serve from 0.0.0.0
Medim
Medim2y ago
Going to try it, one sec. yep, the problem was 127.0.0.1 thanks guys.