-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env
More file actions
64 lines (50 loc) · 1.22 KB
/
.env
File metadata and controls
64 lines (50 loc) · 1.22 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
59
60
61
62
63
64
# KAS 后端服务器环境变量配置
# 服务器配置
PORT=8080
HOST=0.0.0.0
NODE_ENV=production
# 数据库配置
PGUSER=ZhonXu
PGHOST=127.0.0.1
PGDATABASE=KASDB
PGPASSWORD=iLOVEZX114514
PGPORT=5432
# 数据库连接池配置
DB_CONNECTION_TIMEOUT=10000
DB_IDLE_TIMEOUT=30000
DB_MAX_CONNECTIONS=20
# 跨域配置
CORS_ALLOWED_ORIGINS=http://localhost:5173,http://127.0.0.1:5173,http://localhost:3000,http://117.72.79.92:5173,http://117.72.79.92:3000,http://117.72.79.92
CORS_CREDENTIALS=true
# WebSocket配置
WS_PING_INTERVAL=30000
WS_MAX_CLIENTS=100
# 安全配置
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
SESSION_SECRET=your-session-secret-key-change-this-too
# 2FA配置
TOTP_WINDOW=1
TOTP_SECRET_LENGTH=32
# API配置
API_RATE_LIMIT=100
API_TIMEOUT=30000
# 日志配置
LOG_LEVEL=info
LOG_FILE=logs/app.log
# 文件上传配置
MAX_FILE_SIZE=10mb
UPLOAD_DIR=uploads/
# 缓存配置
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=
# 邮件配置(如果需要)
SMTP_HOST=
SMTP_PORT=587
SMTP_USER=
SMTP_PASSWORD=
# 文件路径配置
DATA_DIR=../JSON
DEFAULT_HEADTEACHER_FORMAT={classNum}班班主任
# Electron配置(如果后端需要知道前端配置)
FRONTEND_URL=http://localhost:5173