Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
motdotla committed Jun 28, 2022
1 parent f32799c commit 228c7b4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Expand Up @@ -43,7 +43,8 @@ console.log(process.env) // remove this after you've confirmed it working
.. or using ES6?

```javascript
import 'dotenv/config' // see https://github.com/motdotla/dotenv#how-do-i-use-dotenv-with-import
import * as dotenv from 'dotenv' // see https://github.com/motdotla/dotenv#how-do-i-use-dotenv-with-import
dotenv.config()
import express from 'express'
```

Expand Down Expand Up @@ -331,7 +332,8 @@ Simply..

```javascript
// index.mjs (ESM)
import 'dotenv/config' // see https://github.com/motdotla/dotenv#how-do-i-use-dotenv-with-import
import * as dotenv from 'dotenv' // see https://github.com/motdotla/dotenv#how-do-i-use-dotenv-with-import
dotenv.config()
import express from 'express'
```

Expand Down Expand Up @@ -368,7 +370,8 @@ import { Client } from 'best-error-reporting-service'
export default new Client(process.env.API_KEY)

// index.mjs
import 'dotenv/config'
import * as dotenv from 'dotenv'
dotenv.config()

import errorReporter from './errorReporter.mjs'
errorReporter.report(new Error('documented example'))
Expand Down

0 comments on commit 228c7b4

Please sign in to comment.