-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from artsy/fix-order-bug
feature: Fix Order Bug
- Loading branch information
Showing
3 changed files
with
70 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,47 @@ | ||
# multienv | ||
# Artsy Multienv | ||
|
||
Load multiple dotenv style environment files | ||
|
||
## Install | ||
|
||
```bash | ||
# 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. | ||
|
||
```javascript | ||
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 | ||
|
||
```dosini | ||
DB_HOST=localhost | ||
DB_USER=root | ||
DB_PASS=s1mpl3 | ||
``` | ||
|
||
redis.env | ||
|
||
```dosini | ||
REDIS_HOST=localhost | ||
REDIS_USER=root | ||
REDIS_PASS=s1mpl3 | ||
``` | ||
|
||
```javascript | ||
loadEnvs('db.env', 'redis.env') | ||
``` | ||
|
||
`process.env` now has the keys and values you defined in your `.env` files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters