Simply check if a certain required environment variable is set. If not, throw an error and exit the process.
import { checkRequiredEnv } from '@frytg/check-required-env';
checkRequiredEnv('MY_IMPORTANT_ENV_VAR');
It uses the logger from @frytg/logger
to log the error and exit the process (with code 1).
Created by @frytg / frytg.digital
Unlicense - also see unlicense.org