我创建了一个缩放的nodejs应用程序并添加了mongodb,一切运行正常(使用环境变量从nodejs内连接到mongodb).现在我想从我的本地机器连接到数据库,我无法让它在我的生活中工作.
rhc port-forward -a [myapp]
Run Code Online (Sandbox Code Playgroud)
收益:
Forwarding ports ...
Address already in use - bind(2) while forwarding port 8080. Trying local port 8081
Address already in use - bind(2) while forwarding port 8080. Trying local port 8081
Address already in use - bind(2) while forwarding port 8081. Trying local port 8082
To connect to a service running on OpenShift, use the Local address
Service Local OpenShift
------- --------------- ---- -------------------------------------------------
haproxy 127.0.0.1:8080 => 127.2.114.130:8080
haproxy 127.0.0.1:8081 => 127.2.114.131:8080
mongodb 127.0.0.1:65211 …
Run Code Online (Sandbox Code Playgroud)