blob: 97d377bf7a1d0ac84b09104a86f929d0b4a7eb35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
export const APP_PREFIX="crupest"
export const APP_NAME="mailserver"
export function getEnvRequired(key: string, usage: string): string {
key = `${APP_PREFIX.toUpperCase()}_${APP_NAME.toUpperCase()}_${key}`
const value = Deno.env.get(key)
if (value == null) {
throw new Error(`Env ${key} does not exist, used for ${usage}.`)
}
return value
}
|