103 lines
2.9 KiB
JavaScript
103 lines
2.9 KiB
JavaScript
/**
|
||
* 应用配置文件 - 业务配置
|
||
* 包含数据库、端口、第三方服务等配置
|
||
*/
|
||
|
||
const env = process.env.NODE_ENV || 'development';
|
||
|
||
module.exports = {
|
||
// 环境配置
|
||
env,
|
||
|
||
// 端口配置
|
||
port: {
|
||
node: 9097, // Node服务端口
|
||
web: 9000 // 前端服务端口
|
||
},
|
||
|
||
// 数据库配置
|
||
db: {
|
||
"username": "autoaiworksys",
|
||
"password": "tRWZXxH6a4AdnXf6",
|
||
"database": "autoaiworksys",
|
||
"host": "192.144.167.231",
|
||
"port": 3306,
|
||
"dialect": "mysql"
|
||
},
|
||
|
||
// Redis配置
|
||
redis: {
|
||
"host": "192.144.167.231",
|
||
"port": "6379",
|
||
"pwd": "zc123",
|
||
},
|
||
oos: {
|
||
"accessKeyId": "LTAI5tENEdLxFU7Ne9wGazsk",
|
||
"accessKeySecret": "nvfvDfz2tLcOH8XE3EQpXsnBFpVyK5",
|
||
region: 'oss-cn-beijing',
|
||
bucket: 'light22600',
|
||
timeout: 30 * 60 * 1000 // OSS 请求超时时间:30分钟(适用于大文件上传)
|
||
},
|
||
|
||
// 分页配置
|
||
pagination: {
|
||
defaultPageSize: 20,
|
||
maxPageSize: 100
|
||
},
|
||
|
||
// 文件上传配置
|
||
upload: {
|
||
path: './upload',
|
||
maxFileSize: 200 * 1024 * 1024, // 200MB
|
||
allowedTypes: ['image/jpeg', 'image/png', 'image/gif', 'application/pdf', 'application/msword']
|
||
},
|
||
|
||
// 日志配置
|
||
log: {
|
||
path: './logs',
|
||
level: env === 'development' ? 'debug' : 'info',
|
||
maxFiles: '14d', // 保留14天日志
|
||
maxSize: '20m' // 单文件最大20MB
|
||
},
|
||
|
||
// 白名单URL - 不需要token验证的接口
|
||
"allowUrls": ["/admin_api/sys_user/login", "/admin_api/sys_user/authorityMenus", "/admin_api/sys_user/register", "/api/user/loginByWeixin", "/file/", "/sys_file/", "/admin_api/win_data/viewLogInfo", "/api/user/wx_auth", '/api/docs', 'api/swagger.json', 'payment/notify', 'payment/refund-notify', 'wallet/transfer_notify', 'user/sms/send', 'user/sms/verify', '/api/version/check','/api/file/upload_file_to_oss_by_auto_work','/api/version/create', 'register', 'send_email_code','/config/remote-code/version'],
|
||
|
||
|
||
// AI服务配置
|
||
ai: {
|
||
"apiKey": "sk-c83cdb06a6584f99bb2cd6e8a5ae3bbc",
|
||
"baseUrl": "https://dashscope.aliyuncs.com/api/v1",
|
||
"model": "qwen-turbo"
|
||
},
|
||
|
||
// MQTT配置
|
||
mqtt: {
|
||
host: process.env.MQTT_HOST || 'localhost',
|
||
port: process.env.MQTT_PORT || 1883,
|
||
username: process.env.MQTT_USERNAME || '',
|
||
password: process.env.MQTT_PASSWORD || '',
|
||
clientId: 'autowork-' + Math.random().toString(16).substr(2, 8)
|
||
},
|
||
|
||
// 定时任务配置
|
||
schedule: {
|
||
enabled: true,
|
||
timezone: 'Asia/Shanghai'
|
||
},
|
||
qq_map_key: "VIABZ-3N6HT-4BLXK-VF3FD-TM6YF-YRFQM",
|
||
|
||
// 邮件服务配置(QQ邮箱)
|
||
email: {
|
||
host: 'smtp.qq.com',
|
||
port: 465,
|
||
secure: true, // 使用SSL
|
||
fromName: '自动找工作系统',
|
||
auth: {
|
||
user: 'light603@qq.com' || '', // QQ邮箱账号,例如: 123456789@qq.com
|
||
pass: 'fxqnednoacqybbba' || '' // QQ邮箱授权码(不是密码,需要在QQ邮箱设置中获取)
|
||
}
|
||
}
|
||
|
||
};
|