File loader loads configuration with cosmiconfig from file system.
It is designed to be easy to use by default:
Searching for configuration file starts at process.cwd(), and continues
to search up the directory tree until it finds some acceptable configuration.
Various extensions are supported, such as .json, .yaml, .toml, .js and .cjs.
Configuration base name defaults to .env (so the full name is .env.json or .env.yaml),
separate file for each environment is also supported. For example, if current NODE_ENV is
development, .env.development.json has higher priority over .env.json.
File loader loads configuration with
cosmiconfig
from file system.It is designed to be easy to use by default:
process.cwd()
, and continues to search up the directory tree until it finds some acceptable configuration..json
,.yaml
,.toml
,.js
and.cjs
..env.json
or.env.yaml
), separate file for each environment is also supported. For example, if currentNODE_ENV
is development,.env.development.json
has higher priority over.env.json
.