简体   繁体   English

将 github 回购协议部署到铁路。 应用程序结果 - 应用程序错误您的应用程序是否正确监听端口?

[英]Deploying github repo to railway. app resulting - Application Error Is your app correctly listening on PORT?

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..在 github 上有一个可用的解决方案,可以添加我这样做的变量,无论我输入什么端口号,它都说已经在使用中,接下来是部署日志上的错误。

   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这是已部署的 repo https://rehub-backend.up.railway.app/的链接,如果您有任何想法,请提供帮助

In place of app.listen(PORT);代替app.listen(PORT); use app.listen(process.env.PORT);使用app.listen(process.env.PORT);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM