【发布时间】:2013-09-06 09:51:04
【问题描述】:
我正在尝试在 heroku 上部署我的节点应用程序。
这个应用程序在本地运行良好,并且在 heroku 上被正确推送。
但是,每当我尝试访问该 URL 时,浏览器都会显示:
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details
起初,我以为那是因为我没有注意我正在侦听的端口(我不太了解 Heroku 的处理方式以及端口是否重要),所以我复制了与他们在他们的开始...:
port = process.env.PORT || 5000;
server.listen(port, function() {
console.log("Listening on " + port);
});
我的 package.json 非常基础:
{
"name":"Radiorev",
"version":"0.0.1",
"dependencies":{
"express":"3.3.5",
"socket.io":"0.9.16"
}
}
救命!
顺便说一句,当我输入 heroku log 时,我的 cmd 工具显示一些非常难以阅读的内容......零换行符。
【问题讨论】:
-
heroku logs --app {appname}究竟输出了什么?
标签: node.js heroku deployment