# opsx-licence - 环境变量配置模板 # 复制此文件为 .env 并根据需要修改 # ============================================ # 后端配置 (backend) # ============================================ # 服务器端口 PORT=9001 # 运行模式: debug / release GIN_MODE=debug # JWT 密钥(生产环境必须修改!) JWT_SECRET=your-super-secret-key-change-this-in-production # 数据库配置 # 可选: sqlite / mysql / postgres DB_DRIVER=sqlite DB_NAME=db.sqlite3 # MySQL 配置(使用 mysql 时填写) # DB_HOST=127.0.0.1 # DB_PORT=3306 # DB_USER=root # DB_PASSWORD=your-password # DB_NAME=opsx_licence # PostgreSQL 配置(使用 postgres 时填写) # DB_HOST=127.0.0.1 # DB_PORT=5432 # DB_USER=postgres # DB_PASSWORD=your-password # DB_NAME=opsx_licence # CORS 配置(多个用逗号分隔) # CORS_ORIGINS=http://localhost:5181,http://127.0.0.1:5181 # ============================================ # 前端配置 (frontend) # ============================================ # 开发环境 API 地址 VITE_API_BASE_URL=http://localhost:9001/api # 生产环境 API 地址(构建时注入) # VITE_APP_BASE_API=/api