我的目标是使用heroku和node.js https://github.com/whitec54/shouts-things创建一个groupme机器人
我对web开发非常陌生,所以这可能很明显,但我似乎不能修复我的heroku应用程序错误。
这是日志返回的消息:
2016-07-26T01:44:52.756548+00:00 heroku[web.1]: State changed from crashed to starting
2016-07-26T01:44:53.848661+00:00 heroku[web.1]: Starting process with command `node routes/index.js`
2016-07-26T01:44:55.966222+00:00 heroku[web.1]: Process exited with status 0
2016-07-26T01:45:09.474760+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=shouts-things.herokuapp.com request_id=19173085-e8ed-4a85-8cd9-90c96b7347f6 fwd="108.178.113.130" dyno= connect= service= status=503 bytes=
2016-07-26T01:45:08.701288+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shouts-things.herokuapp.com request_id=f29fef93-7530-4c1e-9724-73884694b457 fwd="108.178.113.130" dyno= connect= service= status=503 bytes=这个错误似乎比我开始时的错误更好,但我不确定从哪里开始。尽管我已经读过了,但我对Procfiles在heroku中的工作原理的理解是相当薄弱的。
发布于 2016-07-26 14:03:32
在您的Procfile中,它提到了启动routes/index.js,它没有任何代码来运行express服务器。您应该在app.js上注册此路由,并使用node启动app.js。
nodejs npm将帮助您开始使用express-generator项目所需的基本搭建。
https://stackoverflow.com/questions/38579957
复制相似问题