42 lines
895 B
YAML
42 lines
895 B
YAML
server:
|
|
address: ":3000"
|
|
read_timeout: "10s"
|
|
write_timeout: "10s"
|
|
shutdown_timeout: "30s"
|
|
prefork: false
|
|
|
|
redis:
|
|
address: "cxd.whcxd.cn"
|
|
password: "cpNbWtAaqgo1YJmbMp3h"
|
|
port: 16299
|
|
db: 0
|
|
pool_size: 10
|
|
min_idle_conns: 5
|
|
dial_timeout: "5s"
|
|
read_timeout: "3s"
|
|
write_timeout: "3s"
|
|
|
|
logging:
|
|
level: "debug" # 开发环境使用 debug 级别
|
|
development: true # 启用开发模式(美化日志输出)
|
|
app_log:
|
|
filename: "logs/app.log"
|
|
max_size: 100
|
|
max_backups: 10 # 开发环境保留较少备份
|
|
max_age: 7 # 7天
|
|
compress: false # 开发环境不压缩
|
|
access_log:
|
|
filename: "logs/access.log"
|
|
max_size: 100
|
|
max_backups: 10
|
|
max_age: 7
|
|
compress: false
|
|
|
|
middleware:
|
|
enable_auth: true # 开发环境可选禁用认证
|
|
enable_rate_limiter: true
|
|
rate_limiter:
|
|
max: 1000
|
|
expiration: "1m"
|
|
storage: "memory"
|