简体   繁体   English

Heroku上的Express JS应用显示应用程序错误

[英]Express JS app on Heroku shows Application Error

I am trying to host my Express JS app on Heroku, I have uploaded it on my gitHub repo and associated it with my heroku account. 我正在尝试在Heroku上托管Express JS应用程序,我已将其上传到我的gitHub存储库中,并将其与我的heroku帐户相关联。 I created the Procfile with content 我用内容创建了Procfile

web: node app.js

But when I go to my application link on Heroku it gives Application Error. 但是,当我转到Heroku上的应用程序链接时,出现应用程序错误。

What I am doing wrong? 我做错了什么? Do I need to give my index.js instead of app.js? 我需要给我index.js而不是app.js吗?

I upgraded my git to 2.3.0 and now the logs are coming in. It seems the issue was that no web dynos were running. 我将git升级到2.3.0,现在日志进入了。看来问题是没有网络测功机在运行。

I went in my terminal and did 我在航站楼去了

heroku logs --app myappname heroku日志--app myappname

heroku ps:scale web=1 --app myappname heroku ps:scale web = 1 --app myappname

and now the application is working 现在该应用程序正在运行

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

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