Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ console.log(process.env) // remove this after you've confirmed it is working
import 'dotenv/config'
```

ES6 import if you need to set config options:

```javascript
import dotenv from 'dotenv'

dotenv.config({ path: '/custom/path/to/.env' })
```

That's it. `process.env` now has the keys and values you defined in your `.env` file:

```javascript
Expand Down