Files
gen2d/backend/internal/config/config.yml
T
wonder fb0d83251f feat(log): 新建 logger 包,基于 log/slog 提供结构化日志
- 新建 internal/logger/logger.go,提供 Init/FromCtx/WithRequestID 方法
- Config 新增 LogConfig(level/format),支持 GEN2D_LOG_LEVEL/GEN2D_LOG_FORMAT 环境变量
- config.yml 和 .env.example 添加日志配置示例
2026-05-25 14:30:35 +08:00

34 lines
630 B
YAML
Executable File

# gen2d backend configuration
# 敏感信息(api_key)请通过环境变量设置,不要直接写在文件中提交。
server:
port: 8080
mode: debug
max_file_size: 10485760 # 10MB
log:
level: info # debug / info / warn / error
format: text # text / json
database:
dsn: "data/gen2d.db"
jwt:
secret: "gen2d-dev-secret"
expire: 7200
llm:
base_url: "https://api.deepseek.com/v1"
api_key: ""
model: "deepseek-v4-pro"
temperature: 0.7
max_tokens: 2048
image_gen:
base_url: "https://api.suchuang.vip/v1"
api_key: ""
model: "gpt-image-2-token"
width: 1024
height: 1024
quality: "low"