-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.ts
More file actions
23 lines (22 loc) · 705 Bytes
/
env.ts
File metadata and controls
23 lines (22 loc) · 705 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { createEnv } from "@t3-oss/env-nextjs";
import { z } from "zod";
export const env = createEnv({
server: {
NODE_ENV: z.enum(["development", "production", "test"]),
PORT: z.string().optional(),
JOIN_API_KEY: z.string().optional(),
RESEND_API_KEY: z.string().optional(),
},
client: {
NEXT_PUBLIC_APP_URL: z.string().optional().default("https://onruntime.com"),
},
runtimeEnv: {
NEXT_PUBLIC_APP_URL: process.env.NEXT_PUBLIC_APP_URL,
NODE_ENV: process.env.NODE_ENV,
PORT: process.env.PORT,
JOIN_API_KEY: process.env.JOIN_API_KEY,
RESEND_API_KEY: process.env.RESEND_API_KEY,
},
skipValidation: !!process.env.CI,
emptyStringAsUndefined: true,
});