-
Notifications
You must be signed in to change notification settings - Fork 0
/
env.mjs
28 lines (26 loc) · 955 Bytes
/
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
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),
// GITHUB_CLIENT_ID: z.string().min(1),
// GITHUB_CLIENT_SECRET: z.string().min(1),
// GITHUB_ACCESS_TOKEN: z.string().min(1),
DATABASE_URL: z.string().min(1),
},
client: {
NEXT_PUBLIC_APP_URL: z.string().min(1),
},
runtimeEnv: {
NEXTAUTH_URL: process.env.NEXTAUTH_URL,
NEXTAUTH_SECRET: process.env.NEXTAUTH_SECRET,
// GITHUB_CLIENT_ID: process.env.GITHUB_CLIENT_ID,
// GITHUB_CLIENT_SECRET: process.env.GITHUB_CLIENT_SECRET,
// GITHUB_ACCESS_TOKEN: process.env.GITHUB_ACCESS_TOKEN,
DATABASE_URL: process.env.DATABASE_URL,
NEXT_PUBLIC_APP_URL: process.env.NEXT_PUBLIC_APP_URL,
},
})