export default defineNitroPlugin(() => { const config = useRuntimeConfig() const checks = { MONGODB_URI: config.mongodbUri, JWT_SECRET: config.jwtSecret, RESEND_API_KEY: config.resendApiKey, HELCIM_API_TOKEN: config.helcimApiToken, } const missing = Object.entries(checks).filter(([, value]) => !value).map(([key]) => key) if (missing.length > 0) { console.error(`FATAL: Missing required environment variables: ${missing.join(', ')}`) console.error('Set these (or their NUXT_-prefixed equivalents) in your .env file or environment variables.') process.exit(1) } })