/* eslint valid-jsdoc: "off" */ 'use strict'; /** * @param {Egg.EggAppInfo} appInfo app info */ const { jwt } = require('./config.secret'); module.exports = appInfo => { /** * built-in config * @type {Egg.EggAppConfig} **/ const config = (exports = {}); // use for cookie sign key, should change to your own and keep security config.keys = appInfo.name + '_1640765284662_2781'; // add your middleware config here config.middleware = [ 'requestLog' ]; // add your user config here const userConfig = { // myAppName: 'egg', }; // 日志 config.logger = { level: 'DEBUG', allowDebugAtProd: true, }; // mq设置 config.amqp = { client: { hostname: '127.0.0.1', username: 'visit', password: 'visit', vhost: 'platform', }, app: true, agent: true, }; // 接收队列名称 config.queue = 'platform/V1/server-user'; // 发送队列名称 config.sendQueue = { logs: 'freeAdmin/server-logs', }; // http请求前缀 config.httpPrefix = { logs: 'http://localhost:13002/freeAdminLog/api', }; // redis设置 config.redis = { client: { port: 6379, // Redis port host: '127.0.0.1', // Redis host password: '123456', db: 1, }, }; // 进程设置 config.cluster = { listen: { port: 9301, }, }; // jwt设置 config.jwt = { ...jwt, expiresIn: '1d', issuer: 'platform-v1', }; // 数据库设置 config.dbName = 'platform-v1'; config.mongoose = { url: `mongodb://localhost:27017/${config.dbName}`, options: { user: 'admin', pass: 'admin', authSource: 'admin', useNewUrlParser: true, useCreateIndex: true, }, }; // 路由设置 config.routePrefix = '/api/live/v1'; // 中间件 config.requestLog = { toMongoDB: true, }; config.module = 'web'; config.session = { maxAge: 1000 * 60 * 30, // 30=>30min renew: true, }; config.export = { root_path: 'D:\\temp', export_path: 'D:\\temp\\export', export_dir: 'export', patentInfo_dir: 'patentInfo', domain: 'http://broadcast.waityou24.cn', }; config.import = { root_path: 'D:\\temp', // root_path: 'D:\\free\\workspace\\server\\service-file\\upload', }; config.project = { mission: 'http://127.0.0.1:4001', hnhmain: 'http://127.0.0.1:9201', }; // 服务器发布路径 config.baseUrl = 'http://broadcast.waityou24.cn'; config.wxapi = { baseUrl: 'http://wx.cc-lotus.info', // 微信网关地址 kjzl: { appid: 'wxcf1b5457939b0932', appSecret: 'f9a947c4a11f5304fc0bcabef98093d8', }, jlstcompany: { appid: 'wx696d9dc3f5c25e42', appSecret: 'b794494632f448f56a6e722f57b42bc9', }, jlstcoupons: { appid: 'wxc98fa7131638a37c', appSecret: 'f55f1734ee919a8e4eac64aea67f350a', }, free: { appid: 'wxdf3ed83c095be97a', appSecret: 'd85dbe075c090cb12ce416bbda8e698c', }, }; return { ...config, ...userConfig, }; };