-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathenv.ts
More file actions
58 lines (47 loc) · 1.36 KB
/
env.ts
File metadata and controls
58 lines (47 loc) · 1.36 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { z } from 'zod'
export const EnvSchema = z.object({
PORT: z.string().default('5000'),
HOST: z.string().default('localhost'),
APP_ENV: z.enum(['development', 'production', 'test']).default('development'),
DEBUG: z
.string()
.transform((v) => v === 'true')
.default(true),
Your_Name: z.string(),
YOUR_EMAIL: z.email(),
YOUR_PASSWORD: z.string(),
LOG_LEVEL: z.string().default('debug'),
GROQ_API_KEY: z.string(),
CORS_ENABLED: z
.string()
.transform((v) => v === 'true')
.default(true),
RATE_LIMIT_ENABLED: z
.string()
.transform((v) => v === 'true')
.default(false),
ENABLE_RATE_LIMITING: z
.string()
.transform((v) => v === 'true')
.default(false),
JWT_SECRET: z.string(),
JWT_EXPIRATION: z.string().default('7d'),
DB_HOST: z.string(),
DB_PORT: z.string(),
DB_NAME: z.string(),
DB_USER: z.string(),
DB_PASSWORD: z.string(),
DB_CONNECTION_STRING: z.string(),
REDIS_HOST: z.string(),
REDIS_PORT: z.string(),
REDIS_PASSWORD: z.string(),
UPLOAD_DIR: z.string(),
TEMP_DIR: z.string(),
MAX_FILE_SIZE: z.string(),
ENCRYPTION_KEY: z.string(),
SERVER_HMAC_SECRET: z.string(),
GOOGLE_API_KEY: z.string().optional(),
OPENAI_API_KEY: z.string().optional(),
BACKEND_URL: z.string().default('http://localhost:5000'),
OLLAMA_HOST: z.string().default('http://localhost:11434'),
})