首页 > 解决方案 > heroku node.js 教程应用程序未运行

问题描述

尝试部署 heroku node.js 教程,我在“本地部署部分” https://devcenter.heroku.com/articles/getting-started-with-nodejs#run-the-app-locally

当我尝试运行该应用程序时,我得到

[node-js-getting-started]$ heroku local web
[OKAY] Loaded ENV .env File as KEY=VALUE Format
18:47:54 web.1   |  Listening on 5000

我运行ps时可以看到

[node-js-getting-started]$ ps
PID TTY           TIME CMD
5524 ttys001    0:00.03 /Applications/iTerm.app/Contents/MacOS/iTerm2 --server login -fp Kevin
5526 ttys001    0:00.04 -bash
6050 ttys001    0:00.98 vi README.md
5495 ttys002    0:00.03 /Applications/iTerm.app/Contents/MacOS/iTerm2 --server login -fp Kevin
5497 ttys002    0:00.11 -bash
6061 ttys003    0:00.04 /Applications/iTerm.app/Contents/MacOS/iTerm2 --server login -fp Kevin
6063 ttys003    0:00.02 -bash
6315 ttys003    0:00.02 heroku local web
6316 ttys003    0:00.01 bash /Users/Kevin/.local/share/heroku/client/bin/heroku local web
6321 ttys003    0:00.00 bash /Users/Kevin/.local/share/heroku/client/bin/../7.0.17/bin/heroku local web
6327 ttys003    0:00.00 bash /Users/Kevin/.local/share/heroku/client/bin/heroku local web
6332 ttys003    0:00.01 bash /Users/Kevin/.local/share/heroku/client/bin/../7.0.17/bin/heroku local web
6340 ttys003    0:00.28 /Users/Kevin/.local/share/heroku/client/7.0.17/bin/node /Users/Kevin/.local/share/heroku/client/7.0.17/bin/run local web
6341 ttys003    0:00.12 /Users/Kevin/.local/share/heroku/client/7.0.17/bin/node /Users/Kevin/.local/share/heroku/client/7.0.17/node_modules/@heroku-c
6342 ttys003    0:00.18 node index.js

但是当我去http://localhost:5000我只是得到一个空白页。

不知道在哪里可以找到日志,我应该查看哪个配置文件。

谢谢

标签: node.jsheroku

解决方案


推荐阅读