Skip to content

Commit

Permalink
add DotenvConfigOptions in README
Browse files Browse the repository at this point in the history
  • Loading branch information
bwyx committed Sep 9, 2021
1 parent 9ea708b commit 99b423c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,18 @@ const config = envSchema({
schema: schema,
data: data, // optional, default: process.env
dotenv: true // load .env if it is there, default: false
// or you can pass DotenvConfigOptions
// dotenv: {
// path: '/custom/path/to/.env'
// }
})

console.log(config)
// output: { PORT: 3000 }
```

see [DotenvConfigOptions](https://github.com/motdotla/dotenv#options)

Optionally, the user can supply their own ajv instance:

```js
Expand Down

0 comments on commit 99b423c

Please sign in to comment.