2.5.0 • Published 7 months ago
@code-like-a-carpenter/dotenv v2.5.0
@code-like-a-carpenter/dotenv
Wrapper around dotenv the loads the right .env file(s) based on the NODE_ENV
Table of Contents
Install
npm i @code-like-a-carpenter/dotenvUsage
This package uses the dotenv package
under the hood, but, depending on NODE_ENV, will load more files than just the
default .env.
Each of the following files will be loaded if they exist, in the following order. Files loaded earlier take precedence.
.env.<env>.local.env.local.env.<env>.env
There are only three valid values for <env>, based on the value of NODE_ENV:
NODE_ENV | <env> |
|---|---|
production | production |
test | test |
| anything else | development |
Please add the following to your gitignore. local env files are intended for
customizing the environment on your local machine and should not be checked
into git.
.env.local
.env.*.local
.env.productionEven though you may check env files into git, you still shouldn't check in secrets.
Maintainer
Contributing
Please see contributing guidelines at the project homepage.
License
MIT © Ian Remmel 2023 until at least now