We use Dotenv to manage our environment variables locally.
The repository will include safe defaults for development in /.env.example
and
for test in /.env.test
. We use 'example' instead of 'development' (from the
Dotenv docs) to be consistent with current dxw conventions and to make it
more explicit that the real values are not to be committed.
To manage sensitive environment variables:
- Add the new key and safe default value to the
/.env.example
file eg.ROLLBAR_TOKEN=ROLLBAR_TOKEN
- Add the new key and real value to your local
/.env.development.local
file, which should never be checked into Git. This file will look something likeROLLBAR_TOKEN=123456789