/** * Server settings, read from process.env at run time only. Never read secrets * through import.meta.env: Vite replaces it at build time and can copy every * value, secrets included, into the built bundle. Set variables in the * environment (Docker env_file, or the shell when running locally). */ export function env(key: string): string | undefined; export function env(key: string, fallback: string): string; export function env(key: string, fallback?: string): string | undefined { const v = process.env[key]; return v === undefined || v === "" ? fallback : v; }