Heroku无法GET / [英] Heroku Cannot GET /
问题描述
我是Heroku的新人,相信我遵循Heroku网站上列出的所有步骤,通过node.js部署 - https://devcenter.heroku.com/articles/getting-started-with-nodejs - 但尽管有成功的迹象,我只有在浏览器中看到这一点,当我去我的新生成的herokuapp.com网站。
无法GET /
执行
git push heroku master
我的Procfile只是简单的
web:node app我不太明白,但似乎有一个运行:
heroku ps
=== web(1X): node app.js
web.1:up 2014/07/03 23:55:00(〜18m ago)
然后:他>
他roku open
打开APP-NAME ...完成
但是 https://APP-NAME.herokuapp.com/ 只显示不能GET / 消息。
解决方案我的 dist 目录包含在我的 .gitignore 文件中,所以我没有提交dist我的回购,而不是推到Heroku。因此,Heroku找不到任何内容。
我更新了我的.gitignore,承诺和推送,我的应用程序现在显示在Heroku上。 p>
I am new to Heroku and believe I am following all of the steps outlined on Heroku's website to deploy via node.js – https://devcenter.heroku.com/articles/getting-started-with-nodejs – but despite indications of success, I only see this in the browser when I go to my newly-generated herokuapp.com site.
Cannot GET /
No errors when executing
git push heroku master
My Procfile is simply
web: node app.js
I dont quite understand dynos yet, but there seems to be one running:
heroku ps
=== web (1X): node app.js
web.1: up 2014/07/03 23:55:00 (~ 18m ago)
Then:
heroku open
Opening APP-NAME... done
But https://APP-NAME.herokuapp.com/ just displays the Cannot GET / message.
解决方案 I had my dist directory included in my .gitignore file so I was not committing dist to my repo and not pushing it to Heroku. Therefore, Heroku could not find any content to serve.
I updated my .gitignore, committed, and pushed, and my app shows up just fine on Heroku now.
这篇关于Heroku无法GET /的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!