1.2.0 • Published 3 years ago
@artsy/multienv v1.2.0
Artsy Multienv
Load multiple dotenv style environment files
Install
# with npm
npm install @artsy/multienv
# or with Yarn
yarn add @artsy/multienv
Usage
As early as possible in your application, require and configure dotenv.
import { loadEnvs } from '@artsy/multienv'
Create some .env
files in the root directory of your project. Add
environment-specific variables on new lines in the form of NAME=VALUE
.
For example:
db.env
DB_HOST=localhost
DB_USER=root
DB_PASS=s1mpl3
redis.env
REDIS_HOST=localhost
REDIS_USER=root
REDIS_PASS=s1mpl3
loadEnvs('db.env', 'redis.env')
process.env
now has the keys and values you defined in your .env
files.
1.2.0
3 years ago
1.1.0
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago
1.2.0-canary.7.75.0
3 years ago
1.2.0-canary.7.76.0
3 years ago
1.0.1-canary.4.49.0
3 years ago
1.1.1-canary.undefined.80.0
3 years ago
1.1.0-canary.7.72.0
3 years ago
1.0.1-canary.5.55.0
3 years ago
1.1.1-canary.undefined.79.0
3 years ago
1.0.1-canary.6.61.0
3 years ago
1.0.1-canary.6.64.0
3 years ago
1.0.1-canary.3.43.0
3 years ago
1.0.1-canary.3.40.0
3 years ago