Loads environment variables from the .env files. NODE_ENV has to be set in the environment and will not be picked up from the filesystem.
.env
NODE_ENV
If NODE_ENV is not set, it defaults to development.
development
Environment variables are loaded in the following order:
.env.${NODE_ENV}.local
.env.${NODE_ENV}
.env.local
Optional
Additional options to use where path is where to find .env files.
path
Loads environment variables from the
.envfiles.NODE_ENVhas to be set in the environment and will not be picked up from the filesystem.If
NODE_ENVis not set, it defaults todevelopment.Environment variables are loaded in the following order:
.env.${NODE_ENV}.local.env.${NODE_ENV}.env.local.env