diff --git a/CHANGELOG.md b/CHANGELOG.md index 486dacfc..2d7df42d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +## [6.2.0] - 2018-12-03 + +### Added + +- Support preload configuration via environment variables ([#351](https://github.com/motdotla/dotenv/issues/351)) + ## [6.1.0] - 2018-10-08 ### Added @@ -32,7 +38,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Removed -- Testing aginst Node v7 +- Testing against Node v7 ## [4.0.0] - 2016-12-23 @@ -98,7 +104,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Removed - support for multiple `.env` files. should always use one `.env` file for the current environment -[Unreleased]: https://github.com/motdotla/dotenv/compare/v6.1.0...HEAD +[Unreleased]: https://github.com/motdotla/dotenv/compare/v6.2.0...HEAD +[6.2.0]: https://github.com/motdotla/dotenv/compare/v6.1.0...v6.2.0 [6.1.0]: https://github.com/motdotla/dotenv/compare/v6.0.0...v6.1.0 [6.0.0]: https://github.com/motdotla/dotenv/compare/v5.0.0...v6.0.0 [5.0.0]: https://github.com/motdotla/dotenv/compare/v4.0.0...v5.0.0 diff --git a/README.md b/README.md index 034fc52d..cb4148b3 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ db.connect({ ### Preload -You can use the `--require` (`-r`) command line option to preload dotenv. By doing this, you do not need to require and load dotenv in your application code. This is the preferred approach when using `import` instead of `require`. +You can use the `--require` (`-r`) [command line option](https://nodejs.org/api/cli.html#cli_r_require_module) to preload dotenv. By doing this, you do not need to require and load dotenv in your application code. This is the preferred approach when using `import` instead of `require`. ```bash $ node -r dotenv/config your_script.js @@ -65,6 +65,16 @@ The configuration options below are supported as command line arguments in the f $ node -r dotenv/config your_script.js dotenv_config_path=/custom/path/to/your/env/vars ``` +Additionally, you can use environment variables to set configuration options. Command line arguments will precede these. + +```bash +$ DOTENV_CONFIG_