Heroku Buildpack to set dynamic env vars like domain for review apps
Heroku dynamically creates the domain for the review app, as a result we can't inherit them from parent app. Heroku review app scripts are only run after the buildpacks. Env vars are loaded in when node starts up. We need the url set set for when we start node.
Looked into documentation and examples for buildpacks and got an understanding of how env vars are set.
Found that they are read from a tmp dir where each env var has it's own file. (eg
$HOSTNAME would be in a file called
Write our own env var files before they are read in.
Copy the snippet above into CLI.