https://github.com/bbqsrc/proxenv
https://github.com/bbqsrc/proxenv
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/bbqsrc/proxenv
- Owner: bbqsrc
- License: bsd-2-clause
- Created: 2016-03-19T05:21:25.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-20T14:57:28.000Z (almost 10 years ago)
- Last Synced: 2024-12-31T21:11:58.643Z (about 1 year ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# proxenv
Simple, unobtrusive config management.
Manage `yaml` or `json` configs based on your `NODE_ENV`, with safe proxying
to ensure no unexpected runtime errors.
## Usage
### Using `NODE_ENV`
```javascript
const config = require("proxenv")("path/to/configs")
// config = { "test": true }
console.log(config.test) // -> true
console.log(config.invalid) // -> {}
console.log(config.invalid.and.getting.deeper) // -> {}
```
### With provided environment
```javascript
const config = require("proxenv")("path/to/configs", "provided env")
```
## License
BSD 2-clause. See LICENSE.