-
Notifications
You must be signed in to change notification settings - Fork 0
/
env.ts
36 lines (34 loc) · 1.11 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
32
33
34
35
36
import { createEnv } from "@t3-oss/env-nextjs";
import { z } from "zod";
import path from "path";
import dotenv from "dotenv";
dotenv.config({
path: `${path.relative(process.cwd(), __dirname)}/.env.${
process.env.NODE_ENV
}`,
});
export const env = createEnv({
server: {
GOOGLE_API_KEY: z.string().min(1),
NEYNAR_API_KEY: z.string().min(1),
DATABASE_URL: z.string().url(),
PRIVY_APP_SECRET: z.string().min(1),
PRIVY_VERIFICATION_KEY: z.string().min(1),
PRIVY_WEBHOOK_SIGNING_KEY: z.string().min(1),
DISCORD_TOKEN: z.string().min(1),
DISCORD_GUILD_ID: z.string().min(1),
DISCORD_CLIENT_ID: z.string().min(1),
PINATA_JWT: z.string().min(1),
MATCHA_API_KEY: z.string().min(1),
},
client: {
NEXT_PUBLIC_ENVIRONMENT: z.enum(["development", "production"]),
NEXT_PUBLIC_PRIVY_APP_ID: z.string().min(1),
NEXT_PUBLIC_DOMAIN: z.string().min(1),
},
experimental__runtimeEnv: {
NEXT_PUBLIC_ENVIRONMENT: process.env.NEXT_PUBLIC_ENVIRONMENT,
NEXT_PUBLIC_PRIVY_APP_ID: process.env.NEXT_PUBLIC_PRIVY_APP_ID,
NEXT_PUBLIC_DOMAIN: process.env.NEXT_PUBLIC_DOMAIN,
},
});