https://github.com/azer/with-env
Read and apply .env file (if exists) in the working directory.
https://github.com/azer/with-env
Last synced: 10 months ago
JSON representation
Read and apply .env file (if exists) in the working directory.
- Host: GitHub
- URL: https://github.com/azer/with-env
- Owner: azer
- Created: 2014-03-25T21:25:23.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2017-07-08T04:09:09.000Z (almost 9 years ago)
- Last Synced: 2024-04-15T03:09:42.304Z (about 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 179 KB
- Stars: 16
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## with-env
Read and apply .env file (if exists) in the working directory.
## Install
```bash
$ npm install with-env
```
## Usage
Create an `.env` file:
```
PORT=8080
AWS_KEY=abcde
DB=user@foobar.com/corge
```
And call `with-env` on top of your module:
```js
require('with-env')()
console.log(process.env.AWS_KEY)
// => 'abcde'
```