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 be passed to dotenv.config where path is where to find .env files.
dotenv.config
path
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.If
NODE_ENV
is not set, it defaults todevelopment
.Environment variables are loaded in the following order:
.env.${NODE_ENV}.local
.env.${NODE_ENV}
.env.local
.env