我的index.js:
const PORT = process.env.PORT || 8453;
app.listen(PORT, () => console.log("Server in listening on port: " + PORT));
但是,在部署日志中:
Running build (yarn)
yarn run v1.22.4
$ node src/index.js
Server in listening on port: 8453
最佳答案
这是您在本地运行代码时的日志。 Heroku 日志看起来不同。
关于javascript - Heroku 在部署时不指定端口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61035610/