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.
1.1 kB ยท 30 lines
TypeScript
12345678910111213141516171819202122232425262728293031import { 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 left `setupAnalytics` permanently no-op inside * the compiled `apps/server` binary. The other keys stay as literal member * accesses because Next.js needs them that way to inline `NEXT_PUBLIC_*`. */const processEnv: Record<string, string | undefined> = process.env;
export const env = createEnv({ server: { OPENPANEL_CLIENT_SECRET: z.string(), NODE_ENV: z.string().prefault("development"), }, client: { NEXT_PUBLIC_OPENPANEL_CLIENT_ID: z.string(), }, clientPrefix: "NEXT_PUBLIC_", runtimeEnv: { OPENPANEL_CLIENT_SECRET: process.env.OPENPANEL_CLIENT_SECRET, NODE_ENV: processEnv.NODE_ENV, NEXT_PUBLIC_OPENPANEL_CLIENT_ID: process.env.NEXT_PUBLIC_OPENPANEL_CLIENT_ID, }, skipValidation: true,});