duoqi-api/.env.example
Wang Zhuoxuan 3623ad04b6 docs: 添加 JWT_SECRET 和 ADMIN_TOKEN 生成方式说明
在环境变量模板和部署文档中添加了密钥生成的安全实践说明,
包括 openssl 和 Node.js 两种生成方式,以及相关的安全提示。
2026-04-16 16:02:01 +08:00

33 lines
679 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Database
DATABASE_URL=mysql://root:password@localhost:3306/duoqi
# JWT
# 生成安全密钥: openssl rand -base64 32
# 或: node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"
JWT_SECRET=change-me-to-a-secure-secret
JWT_EXPIRES_IN=1h
JWT_REFRESH_EXPIRES_IN=30d
# Admin
# 生成方式同 JWT_SECRET建议与生产环境使用不同的值
ADMIN_TOKEN=change-me-admin-token
# Huawei ID Kit (Phase 1b)
HUAWEI_CLIENT_ID=
HUAWEI_CLIENT_SECRET=
# Alibaba Cloud OSS
OSS_ACCESS_KEY_ID=
OSS_ACCESS_KEY_SECRET=
OSS_BUCKET=
OSS_REGION=
# Huawei IAP (Phase 1c)
HUAWEI_IAP_URL=
HUAWEI_MERCHANT_ID=
# Application
PORT=3000
NODE_ENV=development
LOG_LEVEL=info