diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..76bd9ee --- /dev/null +++ b/.env.example @@ -0,0 +1,4 @@ +# ----------------------------------------------------------------------------- +# App +# ----------------------------------------------------------------------------- +NEXT_PUBLIC_APP_URL=http://localhost:3000 diff --git a/env.mjs b/env.mjs new file mode 100644 index 0000000..4043621 --- /dev/null +++ b/env.mjs @@ -0,0 +1,15 @@ +import { createEnv } from "@t3-oss/env-nextjs"; +import { z } from "zod"; + +export const env = createEnv({ + server: { + // This is optional because it's only used in development. + // See https://next-auth.js.org/deployment. + }, + client: { + NEXT_PUBLIC_APP_URL: z.string().min(1), + }, + runtimeEnv: { + NEXT_PUBLIC_APP_URL: process.env.NEXT_PUBLIC_APP_URL, + }, +});