feat: slugify, rate limit ed env helper con test
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
export function getEnv(name: string, fallback?: string): string {
|
||||
const v = process.env[name] ?? (import.meta.env ? import.meta.env[name] : undefined) ?? fallback;
|
||||
if (v === undefined) throw new Error(`Variabile d'ambiente mancante: ${name}`);
|
||||
return v;
|
||||
}
|
||||
Reference in New Issue
Block a user