{"id":31904408,"url":"https://github.com/cloudfoundry-community/cf-env","last_synced_at":"2025-10-13T13:49:40.403Z","repository":{"id":6833332,"uuid":"8081681","full_name":"cloudfoundry-community/cf-env","owner":"cloudfoundry-community","description":"Display Cloud Foundry environment variables in a simple webapp","archived":false,"fork":false,"pushed_at":"2023-03-24T18:08:12.000Z","size":3614,"stargazers_count":12,"open_issues_count":0,"forks_count":21,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-04-14T22:47:38.760Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"svaiyapu/cf-env","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudfoundry-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-07T21:06:15.000Z","updated_at":"2024-02-09T14:28:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"654b71f1-7f6b-4be5-ba9c-a596934ea0cd","html_url":"https://github.com/cloudfoundry-community/cf-env","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cloudfoundry-community/cf-env","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry-community%2Fcf-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry-community%2Fcf-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry-community%2Fcf-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry-community%2Fcf-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudfoundry-community","download_url":"https://codeload.github.com/cloudfoundry-community/cf-env/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry-community%2Fcf-env/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279015348,"owners_count":26085686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-13T13:48:58.151Z","updated_at":"2025-10-13T13:49:40.393Z","avatar_url":"https://github.com/cloudfoundry-community.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Display Cloud Foundry environment variables\n\n\u003cimg src=\"https://raw.github.com/cloudfoundry-community/cf-env/master/docs/images/demo.png\" /\u003e\n\nA simple Sinatra application. Once deployed to Cloud Foundry, it will echo the Environment and HTTP Request Headers.\n\nThis is especially useful to learn about service connection details (`$VCAP_SERVICES`) being passed to an application. Create them, bind them to this running application, and you'll see the nested JSON string that is set in `$VCAP_SERVICES`.\n\n## Deploy\n\nThe repo contains a manifest file which creates a new application called `cfenv`, with a random string in the URL to avoid collisions.\n\nTo deploy:\n\n```\n$ cf push\nUsing manifest file manifest.yml\n\nCreating cfenv... OK\n\nCreating route cfenv-dfe2f.cfapps.io... OK\nBinding cfenv-dfe2f.cfapps.io to cfenv... OK\nUploading cfenv... OK\nStarting cfenv... OK\n-----\u003e Downloaded app package (64K)\n-----\u003e Using Ruby version: ruby-1.9.3\n-----\u003e Installing dependencies using Bundler version 1.3.2\n       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment\n       Fetching gem metadata from https://rubygems.org/..........\n       Fetching gem metadata from https://rubygems.org/..\n       Installing json_pure (1.8.0)\n       Installing rack (1.5.2)\n       Installing rack-protection (1.5.0)\n       Installing tilt (1.4.1)\n       Installing sinatra (1.4.3)\n       Using bundler (1.3.2)\n       Your bundle is complete! It was installed into ./vendor/bundle\n       Cleaning up the bundler cache.\n-----\u003e Uploading droplet (24M)\nChecking cfenv...\nStaging in progress...\nStaging in progress...\nStaging in progress...\n  1/1 instances: 1 running\nOK\n$ open http://cfenv-dfe2f.cfapps.io\n```\n\n## Env Var API\n\nTo view a specific environment variable, you can use the `/v1/:var` endpoint:\n\n```\n$ curl http://cfenv-dfe2f.cfapps.io/v1/CF_INSTANCE_PORTS\n[{\"external\":60148,\"internal\":8080},{\"external\":60149,\"internal\":2222}]\n```\n\nFor envrionment variables that contain JSON data, you can grab\nindividual values out of them as well (values are re-encoded to JSON):\n\n```\n$ curl http://cfenv-dfe2f.cfapps.io/v1/CF_INSTANCE_PORTS/0\n{\"external\":60148,\"internal\":8080}\n$ curl http://cfenv-dfe2f.cfapps.io/v1/CF_INSTANCE_PORTS/0/internal\n8080\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudfoundry-community%2Fcf-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudfoundry-community%2Fcf-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudfoundry-community%2Fcf-env/lists"}