Environmental Variables and Keys
Factor uses the Dotenv standard to set environmental configuration and to securely manage your private keys.
Dealing with private keys and environmentally-specific configuration can be challenging. However, the
.env approach simplifies it and standardizes it.
Storing configuration in the environment separate from code is based on The Twelve-Factor App methodology.
.env file to the root of your application. Once you've done that, Factor will detect this file and automatically load all variables into Node's
Add variables with the following syntax:
# Comment NAME=VALUE
- Never commit to source control (git). Make sure you add
- Environmental variables are meant to be setup manually for each environment.
- Your production environment may not use actual
.envfiles; in production, reference your host's documentation for their recommendation on adding environmental variables.