【发布时间】:2013-10-22 22:11:11
【问题描述】:
我想将 sails.js(版本 0.9.7)应用程序部署到 Openshift,但在 git push 之后我得到了这个日志:
debug: Lowering sails...
DEBUG: Starting child process with 'node app.js'
.
.
.
info: Server lifted in `/var/lib/openshift/525ccaba5973caa65100002b/app-root/runtime/repo`
info: To see your app, visit http://127.7.215.1:8080
info: To shut down Sails, press <CTRL> + C at any time.
.
.
debug: --------------------------------------------------------
debug: :: Tue Oct 15 2013 03:03:56 GMT-0400 (EDT)
debug:
debug: Environment : development
debug: Host : 127.7.215.1
debug: Port : 8080
debug: --------------------------------------------------------
.
.
error: Server doesn't seem to be starting.
error: Perhaps something else is already running on port 8080 with hostname 127.7.215.1?
.
.
debug: Lowering sails...
DEBUG: Starting child process with 'node app.js'
遵循this thread on GitHub 的一些提示并检查示例config/local.js https://gist.github.com/chrisaiv/5938158
在测试任何组合之后,Openshift 服务器只是一遍又一遍地重新启动。我还测试了几个端口,例如 8080、80、1337,……我认为不是所有的都忙。我尝试运行 nodeapp.js 并且应用程序出人意料地在端口 8080 上运行,但直到我尝试访问 views/home/index,可能是因为来自 ssh 我没有足够的权限。
以防万一,我的config/local.js 文件如下所示:
module.exports = {
port: process.env.OPENSHIFT_NODEJS_PORT,
host: process.env.OPENSHIFT_NODEJS_IP
}
感谢您的任何建议;-)
【问题讨论】:
-
我以前用过openshift。它只是一个麻烦......最好不要在那个网络/云解决方案上工作。
标签: node.js openshift sails.js