-
Notifications
You must be signed in to change notification settings - Fork 0
/
env.mjs
26 lines (25 loc) · 1017 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
import { createEnv } from '@t3-oss/env-nextjs';
import { z } from 'zod';
export const env = createEnv({
server: {
CLOUDINARY_API_SECRET: z.string().min(1),
NODE_ENV: z.enum(['development', 'test', 'production']).optional(),
},
client: {
NEXT_PUBLIC_TINA_TOKEN: z.string().min(1),
NEXT_PUBLIC_TINA_CLIENT_ID: z.string().min(1),
NEXT_PUBLIC_TINA_BRANCH: z.string().optional(),
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME: z.string().min(1),
NEXT_PUBLIC_CLOUDINARY_API_KEY: z.string().min(1),
},
runtimeEnv: {
NODE_ENV: process.env.NODE_ENV,
NEXT_PUBLIC_TINA_CLIENT_ID: process.env.NEXT_PUBLIC_TINA_CLIENT_ID,
NEXT_PUBLIC_TINA_TOKEN: process.env.NEXT_PUBLIC_TINA_TOKEN,
NEXT_PUBLIC_TINA_BRANCH: process.env.NEXT_PUBLIC_TINA_BRANCH,
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME:
process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME,
NEXT_PUBLIC_CLOUDINARY_API_KEY: process.env.NEXT_PUBLIC_CLOUDINARY_API_KEY,
CLOUDINARY_API_SECRET: process.env.CLOUDINARY_API_SECRET,
},
});