Skip to content

Instantly share code, notes, and snippets.

@markstgodard
Last active January 13, 2016 18:29
Show Gist options
  • Save markstgodard/09dd01abe53e4db0c2e3 to your computer and use it in GitHub Desktop.
Save markstgodard/09dd01abe53e4db0c2e3 to your computer and use it in GitHub Desktop.

Assume we have two apps (microservices) that comprise our "store" app

  • orders and
  • products

Orders app

cd ../orders
cf push orders
curl orders.bosh-lite.com

Products app

cd ../products
cf push products
curl products.bosh-lite.com

Store app (what we want)

But for example, maybe we want to use context paths instead of having orders.bosh-lite.com and products.bosh-lite.com

So istead of having separate top level urls:

orders.bosh-lite.com
products.bosh-lite.com

We want:

store.bosh-lite.com/orders --> orders app
store.bosh-lite.com/products --> products app
cf map-route orders bosh-lite.com --hostname store --path orders
cf map-route products bosh-lite.com --hostname store --path products

Note: In this case, the apps will need to be able to respond to "/orders" and "/products" respectively. The routing does not map "store.bosh-lite.com/orders" to the "/" of orders app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment