- Move all application env vars to repository-root .env (with .env.example as the committed template) and drop the per-app .env.example files. - Add @code/env subpaths (agent, convex) and consume validated exports everywhere instead of reading process.env directly. - Wire every dev/build/start script to load ../../.env via bun --env-file and point vite.config.ts envDir at the repo root.
14 lines
332 B
TypeScript
14 lines
332 B
TypeScript
import { createEnv } from "@t3-oss/env-core";
|
|
import { z } from "zod";
|
|
|
|
export const env = createEnv({
|
|
emptyStringAsUndefined: true,
|
|
runtimeEnv: process.env,
|
|
server: {
|
|
CONVEX_SITE_URL: z.url(),
|
|
FLUE_DB_TOKEN: z.string().min(1),
|
|
NATIVE_APP_URL: z.string().min(1).default("code://"),
|
|
SITE_URL: z.url(),
|
|
},
|
|
});
|