@nitra/check-env
v3.2.0
Published
Check that the critical environment variables are set
Downloads
898
Readme
check-env
Check that the critical environment variables are set for your app, and that you did not leave dangerous development overrides in production.
Installation
yarn add @nitra/check-env
Usage
import checkEnv from '@nitra/check-env'
checkEnv(
// Will log an error and throw if any of these are missing:
[
'SOME_API_SECRET',
'PRIVATE_TOKEN',
'SOME_OTHER_IMPORTANT_THING'
// ...
]
)
If some required environment variable are not set, it will tell you and throw an error at the end:
License
MIT - Made with ❤️ by François Best
Using this package at work ? Sponsor me to help with support and maintenance.