ExpressJS app not responding
Hello! I am currently trying to deploy my ExpressJS app with only one basic feature. It works on localhost.
But on the deployed domain I see none of the console log's in the deploy page and also get no responses when making API requests to it, using CURL.
Here's my code:
How would I fix it?
Solution:Jump to solution
use the PORT environment variable provided by railway instead of specifying a port
10 Replies
Project ID:
bca4093c-a405-41ff-a5d8-243b3bb9a985
My ID:
bca4093c-a405-41ff-a5d8-243b3bb9a985
Solution
use the PORT environment variable provided by railway instead of specifying a port
make sure it's listening on 0.0.0.0
So process.env.PORT?
i don't know js
i just took a quick look at the code
Okay, thanks!
let me know if it works
Yep, it works. Thanks a lot! @epik!
no problem