10 months ago
trying to launch a really basic express server on railway and after it builds it runs for a short period and then crashes, I keep getting a 'Port 8080 is already in use' error message, however I'm not specifying a port in my express application. As the docs suggest, I created a port variable and let railway inject a port number. I've tried specifying a port as well and run into the same issue. Not sure if i'm doing something really daft or not but tried multiple times and get the same issue. Full log below Server
running on port 8080
Port 8080 is already in use
container event container died
npm WARN config production Use --omit=dev
instead.
1 Replies
10 months ago
port 8080 would be the port railway injects, so its good that its attempting to listen on that.
someone opened a thread about this exact same issue the other day and it turned out they where calling app.listen twice, have a look through your code to see if you see yourself doing anything like that too
Thanks for the quick response! I’ve checked and definitely only calling app.listen once
10 months ago
are you able to share your code?
10 months ago
Same issue here. Any solutions found?
10 months ago
please open a new thread and share your code