我想在我的应用程序启动期间读取 VCAP_SERVICES 以连接到我的 mongodb 服务,但它为空?
barry-alexanders-MacBook-Pro:~ barryalexander$ vmc create-service mongodb mongodb-relcal RelCal
Creating Service: OK
Binding Service [mongodb-relcal]: OK
Stopping Application 'RelCal': OK
Staging Application 'RelCal': OK
Starting Application 'RelCal': OK
barry-alexanders-MacBook-Pro:~ barryalexander$ vmc apps
+-------------+----+---------+-------------------------+----------------+
| Application | # | Health | URLS | Services |
+-------------+----+---------+-------------------------+----------------+
| RelCal | 1 | RUNNING | relcal.cloudfoundry.com | mongodb-relcal |
| barry | 1 | STOPPED | barry.cloudfoundry.com | |
+-------------+----+---------+-------------------------+----------------+
barry-alexanders-MacBook-Pro:~ barryalexander$ vmc env RelCal
No Environment Variables