homealankar
HOBBYOP
2 years ago
Cloud please tell me the reason
I have attached snap also FYI
8 Replies
dev
MODERATOR
2 years ago
You need to listen on the port that railway provides
more info:
const port = process.env.PORT || 4000dev
MODERATOR
2 years ago
no, it's random
app.listen({ port: 4000 }, () =>
console.log(🚀 Server ready at [http://localhost:4000${server.graphqlPath}](http://localhost:4000${server.graphqlPath}),
),
)
this is how , im passing the port no not in .env
dev
MODERATOR
2 years ago
You need to listen on the port that railway provides
please read this:
dev
MODERATOR
2 years ago
in your case you can get the port by doing:
const port = process.env.PORT || 4000