1

无法将示例应用程序推送到 Bluemix

你好 ,

我试图尝试使用 Bluemix 的 Shiny 示例教程 - http://www.ibm.com/developerworks/library/ba-rtwitter-app/index.html

在经历了多个问题之后,我发现应用程序没有监听 Bluemix 动态分配的端口 -ERROR :“无法在运行状况检查超时内接受连接...”

由于应用程序需要 cf-buildpack-r 假设环境变量也由同一个包处理是否公平?

我在哪里添加以下代码段?

var port=process.env.VCAP_APP_PORT || 1337; http.createServer(app).listen(port), function(){ console.log('Express server listening on port ' + port); });

因为没有其他可见的 js 代码存在。我不确定我是否遗漏了什么。

由于没有可重现的示例来调试此类错误,如何进行必要的修改?

命令

cf push EdusasApp -b https://github.com/aruizga7/cf-buildpack-r --no-route

我还创建了一个本地 manifest.yml,其中包含:

applications: - host: Edusas disk: 1024M name: Edusas buildpack: https:..../cf-buildpack-r path: . domain: ng.bluemix.net mem: 512M instances:

请帮助

4

1 回答 1

1

查看文档http://hub.jazz.net/project/crackmanworld/TwitterBluemix/overview中引用的项目。在项目中有一个文件,http ://hub.jazz.net/project/crackmanworld/TwitterBluemix/ ... 包含服务器启动。当服务器启动时,它绑定到环境变量 VCAP_APP_PORT 中定义的端口,如果需要,您也可以使用 VCAP_PORT。

于 2015-02-06T15:08:26.880 回答