-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv.ts
31 lines (30 loc) · 1.13 KB
/
env.ts
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
import { createEnv } from "@t3-oss/env-nextjs";
import { z } from "zod";
export const env = createEnv({
server: {
DATABASE_URL: z.string().url(),
GITHUB_CLIENT_ID: z.string().min(1),
GITHUB_CLIENT_SECRET: z.string().min(1),
DISCORD_CLIENT_ID: z.string().min(1),
DISCORD_CLIENT_SECRET: z.string().min(1),
CLOUD_NAME: z.string().min(1),
AUTH_SECRET: z.string().min(1),
AUTH0_CLIENT_ID: z.string().min(1),
AUTH0_CLIENT_SECRET: z.string().min(1),
AUTH0_ISSUER: z.string().min(1),
},
client: {},
// If you're using Next.js < 13.4.4, you'll need to specify the runtimeEnv manually
runtimeEnv: {
DATABASE_URL: process.env.DATABASE_URL,
GITHUB_CLIENT_ID: process.env.GITHUB_CLIENT_ID,
GITHUB_CLIENT_SECRET: process.env.GITHUB_CLIENT_SECRET,
DISCORD_CLIENT_ID: process.env.DISCORD_CLIENT_ID,
DISCORD_CLIENT_SECRET: process.env.DISCORD_CLIENT_SECRET,
CLOUD_NAME: process.env.CLOUD_NAME,
AUTH_SECRET: process.env.AUTH_SECRET,
AUTH0_CLIENT_ID: process.env.AUTH0_CLIENT_ID,
AUTH0_CLIENT_SECRET: process.env.AUTH0_CLIENT_SECRET,
AUTH0_ISSUER: process.env.AUTH0_ISSUER,
},
});