Skip to content

Commit

Permalink
edit example
Browse files Browse the repository at this point in the history
  • Loading branch information
NewBieCoderXD committed Jul 21, 2024
1 parent eecd681 commit 8921f19
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions example/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ module.exports = envalid.cleanEnv(process.env, {
MESSAGE: envalid.str({ default: 'Hello, world' }),
USE_TLS: envalid.bool(),
TLS_CERT_PATH: envalid.str({
default: undefined,
requiredWhen: (cleanedEnv)=>{
return cleanedEnv["USE_TLS"]
}
}),
TLS_KEY_PATH: envalid.str({
default: undefined,
requiredWhen: (cleanedEnv)=>{
return cleanedEnv["USE_TLS"]
}
Expand Down

0 comments on commit 8921f19

Please sign in to comment.