Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
856 B ยท 23 lines
TypeScript
123456789101112131415161718192021222324import { createEnv } from "@t3-oss/env-core";import { z } from "zod";
/** * `NODE_ENV` is read through this alias rather than as a literal * `process.env.NODE_ENV` member access: `deno bundle` (esbuild) constant-folds * that exact expression into a string at build time โ `"development"` unless * `--minify` is passed โ which silently disabled every production guard in * this package inside the compiled `apps/server` binary. Aliasing the object * defeats the fold, so the value is read from the real environment at runtime. */const processEnv: Record<string, string | undefined> = process.env;
export const env = createEnv({ server: { RESEND_API_KEY: z.string().min(1), NODE_ENV: z.string().prefault("development"), }, runtimeEnv: { RESEND_API_KEY: process.env.RESEND_API_KEY, NODE_ENV: processEnv.NODE_ENV, },});