diff --git a/src/helper/env.js b/src/helper/env.js new file mode 100644 index 0000000..08bff89 --- /dev/null +++ b/src/helper/env.js @@ -0,0 +1,13 @@ +function requireEnvVars(requiredEnv){ + // Ensure required ENV vars are set + let unsetEnv = requiredEnv.filter((env) => !(typeof process.env[env] !== 'undefined')); + + if (unsetEnv.length > 0) { + return "Required ENV variables are not set: [" + unsetEnv.join(', ') + "]"; + } +} + +// Specify exports +module.exports = { + requireEnvVars +}; \ No newline at end of file