There was a solution available on github of adding the variable i did that, what ever i put port number it says already in use, follow is the error on deploy log..
listening on port 9586
Port 9586 is already in use
[nodemon] app crashed - waiting for file changes before starting...
Following is the error when i open the deployed link Application Error
Is your app correctly listening on $PORT?
View the deployment below to check for errors
this is the link of deployed repo https://rehub-backend.up.railway.app/ , Please do assist if u have any idea
In place of app.listen(PORT); use app.listen(process.env.PORT);