yingsa/server/env-template.txt
2026-01-20 08:50:50 +08:00

86 lines
2.6 KiB
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.

# ==========================================
# 影杀俱乐部管理系统 - 环境配置模板
# ==========================================
# 使用说明:
# 1. 复制此文件为 .env
# 2. 根据实际情况修改各项配置
# 3. .env 文件不应提交到版本控制
# ==========================================
# ------------------------------------------
# 服务器配置
# ------------------------------------------
# 运行环境development / production / test
NODE_ENV=development
# 服务端口默认3000
PORT=3000
# ------------------------------------------
# 数据库配置 (MySQL)
# ------------------------------------------
# 数据库主机地址
DB_HOST=localhost
# 数据库端口默认3306
DB_PORT=3306
# 数据库名称
DB_NAME=yingsha
# 数据库用户名
DB_USER=root
# 数据库密码
DB_PASSWORD=your_password_here
# ------------------------------------------
# JWT 认证配置
# ------------------------------------------
# JWT 密钥(请使用足够复杂的随机字符串)
# 可以使用以下命令生成node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
JWT_SECRET=your_jwt_secret_key_here_change_in_production
# JWT Token 过期时间
# 格式:数字+单位s=秒, m=分钟, h=小时, d=天)
# 示例7d=7天, 24h=24小时, 30m=30分钟
JWT_EXPIRES_IN=7d
# ------------------------------------------
# 微信小程序配置
# ------------------------------------------
# 微信小程序 AppID
# 在微信公众平台 -> 开发管理 -> 开发设置 中获取
WX_APPID=your_wechat_appid_here
# 微信小程序 AppSecret
# 在微信公众平台 -> 开发管理 -> 开发设置 中获取
# 注意:请妥善保管,不要泄露
WX_SECRET=your_wechat_secret_here
# ------------------------------------------
# 文件上传配置(可选)
# ------------------------------------------
# 上传文件大小限制单位MB
UPLOAD_MAX_SIZE=10
# 上传文件存储路径
UPLOAD_PATH=uploads
# ------------------------------------------
# 其他配置(可选)
# ------------------------------------------
# 管理后台默认超级管理员密码(首次初始化时使用)
DEFAULT_ADMIN_PASSWORD=admin123
# 日志级别debug / info / warn / error
LOG_LEVEL=info
# ------------------------------------------
# 高德地图配置(可选,用于地址解析)
# ------------------------------------------
# 高德地图 Web 服务 API Key
# 在高德开放平台 -> 应用管理 -> 我的应用 中创建应用获取
# 注意:需要开通 Web服务 API 权限
AMAP_KEY=your_amap_web_api_key_here