无法执行启动脚本,openshift

时间:2015-07-17 02:24:48

标签: node.js openshift

在Openshift上开始我的第一个应用程序。我的本地电脑上的一切都运行得很好。无法在Openshift服务器上运行它。很确定这是一些配置问题。有什么想法吗?

lsof -i

在我的本地设备上,在我的server.js文件中,我有:

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/opt/rh/nodejs010/root/usr/bin/npm', 'start' ]
2 info using npm@1.4.28
3 info using node@v0.10.35
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart demos-cfg@0.0.1
6 info start demos-cfg@0.0.1
7 verbose unsafe-perm in lifecycle true
8 info demos-cfg@0.0.1 Failed to exec start script
9 error demos-cfg@0.0.1 start: `node server.js`
9 error Exit status 8
10 error Failed at the demos-cfg@0.0.1 start script.
10 error This is most likely a problem with the demos-cfg package,
10 error not with npm itself.
10 error Tell the author that this fails on your system:
10 error     node server.js
10 error You can get their info via:
10 error     npm owner ls demos-cfg
10 error There is likely additional logging output above.
11 error System Linux 2.6.32-504.16.2.el6.x86_64
12 error command "node" "/opt/rh/nodejs010/root/usr/bin/npm" "start"
13 error cwd /var/lib/openshift/<uname>/app-root/runtime/repo
14 error node -v v0.10.35
15 error npm -v 1.4.28
16 error code ELIFECYCLE
17 verbose exit [ 1, true ]

对于Openshift,似乎我应该添加:

app.listen('3000',function(){
console.log("<== App is started at PORT local ==>");
});

0 个答案:

没有答案