Add getEnvVar.ts to convert env vars to appropriate type (or undefined)

This commit is contained in:
mifi committed 2023-05-30 17:41:09 -04:00
1 parent 45d6357937
commit 9e72e98232
5 files changed
+463 -8

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
export const getEnvVar = (key: string) => {
const val = process.env[key];
if (!val) return undefined;
else return JSON.parse(val);
};