25 lines
462 B
TypeScript
25 lines
462 B
TypeScript
export interface Config {
|
|
postgres: {
|
|
url: string;
|
|
};
|
|
mailgun: {
|
|
apiKey?: string;
|
|
domain?: string;
|
|
};
|
|
}
|
|
|
|
function envOrWarn(key: string, fallback?: string): string | undefined {
|
|
const val = Deno.env.get(key);
|
|
if (!val) console.warn(`${key} is not set!`);
|
|
return val || fallback;
|
|
}
|
|
|
|
export const config = {
|
|
postgres: {
|
|
url: envOrWarn(
|
|
"POSTGRES_URL",
|
|
"postgresql://postgres:@127.0.0.1:5432/lyricscreen",
|
|
),
|
|
},
|
|
};
|