应用程序在本地工作,在Heroku上运行 - Node.JS

时间:2011-12-26 22:50:35

标签: node.js heroku express

我正在运行一个简单的快递应用程序,它从S3中提取静态文件,并在本地运行正常,但在Heroku上,它会在关于权限被拒绝但没有进一步信息的警告时不断崩溃。

有没有办法可以找出导致权限错误的原因?

Heroku从部署登录到崩溃:

2011-12-26T22:41:14+00:00 heroku[slugc]: Slug compilation started
2011-12-26T22:41:19+00:00 heroku[api]: Deploy 20d0578 by jeffandersen@gmail.com
2011-12-26T22:41:19+00:00 heroku[api]: Release v20 created by jeffandersen@gmail.com
2011-12-26T22:41:20+00:00 heroku[web.1]: State changed from crashed to created
2011-12-26T22:41:20+00:00 heroku[web.1]: State changed from created to starting
2011-12-26T22:41:21+00:00 heroku[slugc]: Slug compilation finished
2011-12-26T22:41:22+00:00 heroku[web.1]: Starting process with command `node server.js`
2011-12-26T22:41:23+00:00 app[web.1]:    info  - socket.io started
2011-12-26T22:41:23+00:00 app[web.1]:    warn  - error raised: Error: EACCES, Permission denied
2011-12-26T22:41:24+00:00 heroku[web.1]: State changed from starting to crashed
2011-12-26T22:41:25+00:00 heroku[web.1]: Process exited

1 个答案:

答案 0 :(得分:8)

您是否将服务器端口绑定到Heroku注入的环境变量$PORT