Node JS application: deployment is succesfull but server error(application failed to respond)
Cloud please tell me the reason
I have attached snap also FYI
Solution:Jump to solution
You need to listen on the port that railway provides
more info: https://docs.railway.app/guides/fixing-common-errors
```js
const port = process.env.PORT || 4000...
7 Replies
Project ID:
N/A
Solution
You need to listen on the port that railway provides
more info: https://docs.railway.app/guides/fixing-common-errors
So its 3000 not 4000
Is it??
no, it's random
app.listen({ port: 4000 }, () =>
console.log(
🚀 Server ready at http://localhost:4000${server.graphqlPath}
,
),
)
this is how , im passing the port no not in .envYou need to listen on the port that railway provides
please read this: https://docs.railway.app/guides/fixing-common-errors
in your case you can get the port by doing:
sure let me read, thanks