|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 1 | # dotenv-expand
|
|---|
| 2 |
|
|---|
| 3 | <img src="https://raw.githubusercontent.com/motdotla/dotenv-expand/master/dotenv-expand.png" alt="dotenv-expand" align="right" />
|
|---|
| 4 |
|
|---|
| 5 | Dotenv-expand adds variable expansion on top of
|
|---|
| 6 | [dotenv](http://github.com/motdotla/dotenv). If you find yourself needing to
|
|---|
| 7 | expand environment variables already existing on your machine, then
|
|---|
| 8 | dotenv-expand is your tool.
|
|---|
| 9 |
|
|---|
| 10 | [](https://travis-ci.org/motdotla/dotenv-expand)
|
|---|
| 11 | [](https://www.npmjs.com/package/dotenv-expand)
|
|---|
| 12 | [](https://github.com/feross/standard)
|
|---|
| 13 |
|
|---|
| 14 | ## Install
|
|---|
| 15 |
|
|---|
| 16 | ```bash
|
|---|
| 17 | npm install dotenv --save
|
|---|
| 18 | npm install dotenv-expand --save
|
|---|
| 19 | ```
|
|---|
| 20 |
|
|---|
| 21 | ## Usage
|
|---|
| 22 |
|
|---|
| 23 | As early as possible in your application, require dotenv and dotenv-expand, and
|
|---|
| 24 | wrap dotenv-expand around dotenv.
|
|---|
| 25 |
|
|---|
| 26 | ```js
|
|---|
| 27 | var dotenv = require('dotenv')
|
|---|
| 28 | var dotenvExpand = require('dotenv-expand')
|
|---|
| 29 |
|
|---|
| 30 | var myEnv = dotenv.config()
|
|---|
| 31 | dotenvExpand(myEnv)
|
|---|
| 32 | ```
|
|---|
| 33 |
|
|---|
| 34 | See [test/.env](./test/.env) for examples of variable expansion in your `.env`
|
|---|
| 35 | file.
|
|---|
| 36 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.