12 lines
395 B
TypeScript
12 lines
395 B
TypeScript
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;
|
|
});
|