This commit is contained in:
Daniel Flanagan 2022-10-07 21:55:20 -05:00
parent 4fd2b61322
commit b186a40103
Signed by untrusted user: lytedev-divvy
GPG Key ID: 6D69CEEE4ABBCD82
1 changed files with 11 additions and 0 deletions

11
config.ts Normal file
View File

@ -0,0 +1,11 @@
import file from "@/config.json" assert { type: "json" };
const defaults: Record<string, [string, (val: string) => unknown]> = {
DATABASE_URL: ["postgresql://postgres:@127.0.0.1:5432/lyricscreen",
};
export const envs = Object.entries(defaults).map(([key, default]) => {
const val: string | null = Deno.env.get(key) || null;
if (!val) console.warn(`${key} not set!`);
return val;
});