Nodejs test project cannot run on heroku with error log attached.

  node.js, question

图片描述

图片描述

Error displays R10 fail to bind $PORT

I read the previous posts and had the same problem. He said that the number of database connections was limited, but I didn’t use the database at all.

After some searching, the problem was finally solved. This is because heroku restricts the user to use the interface. You can only use the interface assigned by Heroku. Therefore, the interface cannot be Hard coding. process.env.PORT||1992 is OK