ec-nest/.env.example
liuyun 200cedeb59 fix: 第二轮残留问题
- 资源变更清权限缓存(H4 残留)
- 菜单聚合过滤已删角色(与 resolveAuth 一致)
- removeRole 事务化;removeTenant 清 Redis(userState/perm)
- createTenant 事务化 + 未提供密码时生成随机密码
- 登录失败锁定加 IP 维度;register 禁止平台租户
- refresh token 落 ip/userAgent;e2e 用独立账号避免锁死
- .env.example 补 CORS_ORIGIN/NODE_ENV、脱敏默认密码

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-11 17:22:10 +08:00

32 lines
835 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.

# 复制为 .env 并按需修改
# 数据库(MySQL 8)
DATABASE_URL="mysql://root:请替换为数据库密码@127.0.0.1:3306/sysmgr"
# 服务端口
PORT=3000
# 运行环境(production 会关闭 Swagger 并强校验 JWT_SECRET)
NODE_ENV="development"
# CORS 允许来源(逗号分隔;生产改为实际前端域名)
CORS_ORIGIN="http://localhost:5173"
# JWT(生产务必替换 secret,至少 32 位)
JWT_SECRET="dev-secret-change-me"
JWT_ACCESS_TTL="7200"
JWT_REFRESH_TTL="604800"
# 日志(详见 src/logging/logger.config.ts)
LOG_LEVEL="info"
LOG_PRETTY="true"
LOG_FILE_ENABLED="false"
LOG_FILE_PATH="logs/app.log"
# Redis(权限缓存;多 fork 项目共用一个实例时用 REDIS_KEY_PREFIX 隔离)
REDIS_HOST="127.0.0.1"
REDIS_PORT="6379"
REDIS_DB="0"
REDIS_PASSWORD=""
REDIS_KEY_PREFIX="sysmgr:"