alphagov/plek — pull request #15 by JordanHatch (2013-12-10 19:35:14+00:00)
Title: Allow custom URIs for services to be defined

*Note: this pull request is an idea that I've had to make running apps easier when you don't have our dev VM. It's definitely up for discussion if you can think of a better way to do it.*

Allow custom URIs for services to be defined using environment variables, so that it is easier to set up and run multiple services in isolation without them having to be running at particular hostnames.

A service URI can be defined using the following environment variable naming convention:

# replace with the name of the service, uppercased
# and underscored
export PLEK_SERVICE__URI=http://localhost:3000

Existing behaviour of the gem is not affected when these environment variables are not present.