Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/poorlydefinedbehaviour/process-env-loader
load environment variables into node's process.env
https://github.com/poorlydefinedbehaviour/process-env-loader
Last synced: 14 days ago
JSON representation
load environment variables into node's process.env
- Host: GitHub
- URL: https://github.com/poorlydefinedbehaviour/process-env-loader
- Owner: PoorlyDefinedBehaviour
- License: mit
- Created: 2019-07-10T04:47:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-07-18T20:46:18.000Z (over 5 years ago)
- Last Synced: 2024-10-12T23:51:40.117Z (about 1 month ago)
- Language: TypeScript
- Size: 11.7 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# About
Yet another env loader.
## Installation
\$ [npm](https://www.npmjs.com) i process-env-loader
## Usage
```js
import load from "process-env-loader";
load(); // Loads .env from the root of the directory
``````js
import load from "process-env-loader";
load("mypath/subfolder/"); // Loads .env from the specified folder
``````js
import load from "process-env-loader";
/**
* The key value pairs can be separated by anything,
* as long as you specify the separator when loading the file.
* */
load("mypath/subfolder/", "->"); // Loads .env from the specified folder, using the specified seperator
```.env could look like one of these
```js
FOO=BAR
``````js
FOO->BAR
``````js
FOO,BAR
```## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
## License
[MIT](https://choosealicense.com/licenses/mit/)