npm
npm install require-environment-variables --save
yarn
yarn add require-environment-variables
js
const requireEnv = require("require-environment-variables");
requireEnv(['GOOGLEANALYTICSID', 'SSLKEY', 'SSLCERT', 'SSLCA']);
ts
import requireEnv from 'require-environment-variables'
requireEnv(['GOOGLEANALYTICSID', 'SSLKEY', 'SSLCERT', 'SSLCA']);
If any of the environment variables(process.env.GOOGLEANALYTICSID) don't exist, the process exits with code 400
Update and add tests to tests/**/*.spec.ts
Pull requests will verify that tests pass