EternalAI/.env.example

19 lines
631 B
Plaintext

# ===== EternalAI 环境变量配置 =====
# 复制此文件为 .env 并填写真实值
# cp .env.example .env
# 数据库连接字符串
# 格式: postgresql://用户名:密码@主机:端口/数据库名
DATABASE_URL="postgresql://eternalai:YOUR_PASSWORD@localhost:5432/eternalai"
# JWT 密钥 — 生产环境必须修改为随机长字符串(至少 32 字节)
# 生成方法: openssl rand -base64 48
JWT_SECRET="PLEASE_CHANGE_THIS_TO_A_RANDOM_SECRET"
# 服务端口
PORT=3001
# CORS 允许的来源(逗号分隔,生产环境应限制为实际域名)
# 留空则允许所有来源(不推荐)
ALLOWED_ORIGINS=""