-
Notifications
You must be signed in to change notification settings - Fork 82
/
env.mjs
38 lines (32 loc) · 1.19 KB
/
env.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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.
NEXTAUTH_URL: z.string().url().optional(),
NEXTAUTH_SECRET: z.string().min(1),
DATABASE_URL: z.string().min(1),
GOOGLE_CLIENT_ID: z.string().optional(),
GOOGLE_CLIENT_SECRET: z.string().optional(),
GITHUB_CLIENT_ID: z.string().optional(),
GITHUB_CLIENT_SECRET: z.string().optional(),
GITHUB_ACCESS_TOKEN: z.string().optional(),
STRIPE_API_KEY: z.string().optional(),
STRIPE_WEBHOOK_SECRET: z.string().optional(),
STRIPE_SECRET_KEY: z.string().optional(),
RESEND_FROM_ADDRESS: z.string().optional(),
RESEND_FROM_NAME: z.string().optional(),
RESEND_API_KEY: z.string().optional(),
},
client: {
NEXT_PUBLIC_RESEND_ENABLED: z
.string()
.transform((s) => s !== "false" && s !== "0"),
NEXT_PUBLIC_POSTHOG_API_KEY: z.string().optional(),
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: z.string().optional(),
},
experimental__runtimeEnv: {
NEXT_PUBLIC_RESEND_ENABLED: process.env.NEXT_PUBLIC_RESEND_ENABLED,
},
});