VCAP_SERVICES available for local development via AF TUNNEL #26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
VCAP_SERVICESenvironment variable is essential to continuous integration and deployment strategies.af tunnelcommand is extremely useful for local development. It allows for our code to be versioned locally and for our dev db to be kept in appfog for syncing purposes.The only key missing is allowing our app to grab database credentials from
VCAP_SERVICESenvironment variable locally. CLI tools can not write environment variables for all user on any given machine. Environment variables created byafcommand line tool will only be available toafand not our app. This pull request writes theVCAP_SERVICESdata to a file locally, allowing our app to look for itIFthe environment variable does not exist.PHP Example
This works for me, not sure if it might work for others. Might need some adjusting.