https://github.com/ladjs/env
Environment configuration loader for Lad
https://github.com/ladjs/env
config configuration dot dotenv env environment factor koa lad twelve
Last synced: about 1 month ago
JSON representation
Environment configuration loader for Lad
- Host: GitHub
- URL: https://github.com/ladjs/env
- Owner: ladjs
- License: mit
- Created: 2017-09-15T07:24:47.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-11-09T23:06:17.000Z (over 2 years ago)
- Last Synced: 2025-04-05T02:01:53.825Z (about 2 months ago)
- Topics: config, configuration, dot, dotenv, env, environment, factor, koa, lad, twelve
- Language: JavaScript
- Homepage: https://lad.js.org
- Size: 779 KB
- Stars: 8
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [**@ladjs/env**](https://github.com/ladjs/env)
[](https://github.com/ladjs/env/actions/workflows/ci.yml)
[](https://github.com/sindresorhus/xo)
[](https://github.com/prettier/prettier)
[](https://lass.js.org)
[]()> Environment configuration loader for Lad
## Table of Contents
* [Install](#install)
* [Usage](#usage)
* [Options](#options)
* [Contributors](#contributors)
* [License](#license)## Install
[npm][]:
```sh
npm install @ladjs/env
```## Usage
```js
const env = require('@ladjs/env')();console.log(env);
```## Options
You can pass any option as you otherwise would normally to [dotenv-extended][].
Here is the default option argument, note that it supports a `.env.test` path for `TEST` and `TESTING` environments as specified through `process.env.NODE_ENV`.
```js
const env = require('@ladjs/env')({
encoding: 'utf8',
silent: true,
path: '.env',
defaults: '.env.defaults',
schema: '.env.schema',
errorOnMissing: true,
errorOnExtra: true,
errorOnRegex: false,
includeProcessEnv: true,
assignToProcessEnv: true,
overrideProcessEnv: false,
});
```## Contributors
| Name | Website |
| -------------- | -------------------------- |
| **Nick Baugh** | |## License
[MIT](LICENSE) © [Nick Baugh](http://niftylettuce.com/)
##
[npm]: https://www.npmjs.com/
[dotenv-extended]: https://github.com/keithmorris/node-dotenv-extended