-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv.mjs
29 lines (27 loc) · 886 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
29
// @ts-check
import { createEnv } from "@t3-oss/env-nextjs"
import { z } from "zod"
export const env = createEnv({
server: {
AUTH_SECRET: z.string(),
AUTH_GITHUB_ID: z.string(),
AUTH_GITHUB_SECRET: z.string(),
AUTH_URL: z.string().url(),
POSTGRES_URL: z.string().url(),
UPSTASH_REDIS_REST_URL: z.string().url(),
UPSTASH_REDIS_REST_TOKEN: z.string(),
},
client: {
NEXT_PUBLIC_APP_URL: z.string().min(1)
},
runtimeEnv: {
AUTH_SECRET: process.env.AUTH_SECRET,
AUTH_GITHUB_ID: process.env.AUTH_GITHUB_ID,
AUTH_GITHUB_SECRET: process.env.AUTH_GITHUB_SECRET,
AUTH_URL: process.env.AUTH_URL,
POSTGRES_URL: process.env.POSTGRES_URL,
UPSTASH_REDIS_REST_URL: process.env.UPSTASH_REDIS_REST_URL,
UPSTASH_REDIS_REST_TOKEN: process.env.UPSTASH_REDIS_REST_TOKEN,
NEXT_PUBLIC_APP_URL: process.env.NEXT_PUBLIC_APP_URL
},
})