Management of CharityBase API Keys
yarn dev
Expected environment variables are listed in env
in now.json. You may define them in a .env
as follows:
# example .env file in charity-base-auth
CHARITY_BASE_DYNAMO_ACCESS_KEY_ID=example-key-id
CHARITY_BASE_DYNAMO_SECRET_ACCESS_KEY=example-secret-key
...
Note: these values will not override any environment variables already set e.g. in your .bash_profile
.
yarn deploy:production
Note: this requires Now which can be installed globally with npm: npm i -g now
To ensure our sensitive environment variables are only accessible by the code, we store them as Now secrets. This is achieved on the command line:
now secret add charity-base-dynamo-access-key-id example-key-id
now secret add charity-base-dynamo-secret-access-key example-secret-key
...
The environment variable names are mapped to the secret names in env
in now.json. Note the @
prefixing each secret name.