Git 将分支部署到localhost:port意味着什么?
我正在检查StrongLoop或LoopBack框架(不知道有什么区别,他们对此非常困惑)。我使用他们的Git 将分支部署到localhost:port意味着什么?,git,deployment,loopbackjs,strongloop,Git,Deployment,Loopbackjs,Strongloop,我正在检查StrongLoop或LoopBack框架(不知道有什么区别,他们对此非常困惑)。我使用他们的slc deploy命令。slc部署-h说明: Deploy a node application to a StrongLoop process manager Examples: Deploy 'deploy' branch to localhost: slc deploy Deploy 'deploy' branch to a remote host:
slc deploy
命令。slc部署-h
说明:
Deploy a node application to a StrongLoop process manager
Examples:
Deploy 'deploy' branch to localhost:
slc deploy
Deploy 'deploy' branch to a remote host:
slc deploy http://prod1.example.com
Deploy to a remote host, on a non-standard port, using authentication:
slc deploy http://user:pass@prod1.example.com:8765
Deploy 'production' branch to localhost:
slc deploy http://localhost production
我试图部署到本地主机。现在没有任何slc ctl…
命令工作。我在浏览器中看不到localhost
站点,没有服务器运行。以下是我所做的:
C:\Users\user\sbox\strongloop\hi>slc deploy
Counting objects: 4295, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3925/3925), done.
Writing objects: 100% (4295/4295), 6.27 MiB | 4.12 MiB/s, done.
Total 4295 (delta 695), reused 0 (delta 0)
To http://127.0.0.1:8701/default
* [new branch] deploy -> deploy
Deployed `deploy` to `http://127.0.0.1:8701`
C:\Users\user\sbox\strongloop\hi>slc ctl status
Command status failed with Error: connect ECONNREFUSED
上面写着deploy'to'http://127.0.0.1:8701“
。这意味着什么?我尝试打开http://127.0.0.1:8701
在浏览器中,但获得:
现在没有任何slc ctl…
命令工作。输出为命令状态失败,错误为:connect ECONNREFUSED
我的问题是:
命令状态失败并出现错误:connect ECONNREFUSED
当它说
Deployed'deploy'to'http://127.0.0.1:8701“
这意味着您已将deploy
分支部署到运行在127.0.0.1:8701
上的PM实例。请注意,这是PM的URL,而不是您的应用程序
作为开发人员,应用程序监听的端口取决于您。编写应用程序时通常使用端口
环境变量来确定应用程序应侦听的端口
要在pm下运行时设置应用程序的环境变量,请使用类似于slc ctl env set PORT=3000的命令。根据您的设置,您可能需要使用slc ctl-Chttp://127.0.0.1:8701 env set PORT=3000
(对于slc ctl status
,您也需要相同的-C URL
选项)