10 months ago
My node.js project repo is connected to GitHub for deployment and I noticed new deployments were not reflecting on the server. To confirm, I created a test endpoint with a response of 'Hello'. It worked locally but on deployment, the server couldn't find the endpoint.
"Can't find /admin/busi*/t*** on this server!"
The above is the default response my code returns when a non existent endpoint is accessed on the server
1 Replies
10 months ago
Hey there, could you check if your Node.js application is set to listen on the PORT environment variable provided by Railway? Here’s an example for Node/Express:
const port = process.env.PORT || 3000;
app.listen(port, "0.0.0.0", () => {
console.log(`Server is running on port ${port}`);
});Your server should be binding to 0.0.0.0 to allow external connections.
If that is configured correct, you might want to consider redeploying your application to ensure that the most recent version is being used. You can manually redeploy from the Railway dashboard using (Railway Deployment Actions Guide)
If this doesn't help, please check your deployment logs for any errors that can give more clues here
..and unsure if this is express but our guide on that might be helpful as well https://docs.railway.com/guides/express
Status changed to Awaiting User Response Railway • 11 months ago
6 months ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 6 months ago