2013-08-22 158 views
1

我不确定类似这样的问题会对我有帮助。我在这里发布我的问题。在heroku应用程序上的应用程序错误

当我尝试从Git推送后运行heroku应用程序。我得到应用程序错误。我尝试从Heroku日志中了解。但我解决不了。以下是我的Heroku的日志:

2013-08-22T13:41:39.721111+00:00 heroku[api]: Enable Logplex by [email protected] 
2013-08-22T13:41:39.740369+00:00 heroku[api]: Release v2 created by [email protected] 
2013-08-22T13:51:31+00:00 heroku[slug-compiler]: Slug compilation started 
2013-08-22T13:51:46.559912+00:00 heroku[api]: Scale to web=1 by [email protected] 
2013-08-22T13:51:46.584043+00:00 heroku[api]: Add PATH config by [email protected] 
2013-08-22T13:51:46.600930+00:00 heroku[api]: Release v3 created by [email protected] 
2013-08-22T13:51:46.646480+00:00 heroku[api]: Deploy 8435747 by [email protected] 
2013-08-22T13:51:46.670367+00:00 heroku[api]: Release v4 created by [email protected] 
2013-08-22T13:51:46+00:00 heroku[slug-compiler]: Slug compilation finished 
2013-08-22T13:51:50.333471+00:00 heroku[web.1]: Starting process with command `node venkat1.js` 
2013-08-22T13:51:51.462059+00:00 app[web.1]: Script: /app/venkat1.js 
2013-08-22T13:51:51.462059+00:00 app[web.1]: To: hello.txt 
2013-08-22T13:51:51.462059+00:00 app[web.1]: Wrote: A startup is a business built to grow rapidly. 
2013-08-22T13:51:52.874576+00:00 heroku[web.1]: State changed from starting to crashed 
2013-08-22T13:51:52.876904+00:00 heroku[web.1]: State changed from crashed to starting 
2013-08-22T13:51:52.863778+00:00 heroku[web.1]: Process exited with status 0 
2013-08-22T13:51:54.448525+00:00 heroku[web.1]: Starting process with command `node venkat1.js` 
2013-08-22T13:51:55.205895+00:00 app[web.1]: Script: /app/venkat1.js 
2013-08-22T13:51:55.205895+00:00 app[web.1]: Wrote: A startup is a business built to grow rapidly. 
2013-08-22T13:51:55.205895+00:00 app[web.1]: To: hello.txt 
2013-08-22T13:51:56.510045+00:00 heroku[web.1]: State changed from starting to crashed 
2013-08-22T13:51:56.495030+00:00 heroku[web.1]: Process exited with status 0 
2013-08-22T13:51:57.488699+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=hidden-caverns-8212.herokuapp.com fwd="182.65.171.54" dyno= connect= service= status=503 bytes= 
2013-08-22T13:52:06.605453+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=hidden-caverns-8212.herokuapp.com fwd="182.65.171.54" dyno= connect= service= status=503 bytes= 
2013-08-22T13:52:07.142203+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=hidden-caverns-8212.herokuapp.com fwd="182.65.171.54" dyno= connect= service= status=503 bytes= 

我的文件上Github

回答

0

它看起来像你的Coursera Startup Engineering当然做Homework 1

该脚本未设置为承载Web服务器。您正在运行的代码在关闭之前将消息写入hello.txt,这应该在本地计算机或AWS实例上运行。您可以通过检查hello.txt文件来查看结果。

Homework 3中,您将看到使用node.js Express框架创建Web服务器的代码,您可以在Heroku上托管并使用浏览器访问该框架。