/* eslint valid-jsdoc: "off" */ 'use strict'; /** * @param {Egg.EggAppInfo} appInfo app info */ 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 + '_1640765645851_7833'; // add your middleware config here config.middleware = []; // add your user config here const userConfig = { // myAppName: 'egg', }; // mq设置 config.amqp = { client: { hostname: '127.0.0.1', username: 'freeAdmin', password: '1qaz2wsx', vhost: 'freeAdmin', }, app: true, agent: true, }; // 进程设置 config.cluster = { listen: { port: 13002, }, }; // 数据库设置 config.dbName = 'freeAdmin-logs'; config.mongoose = { url: `mongodb://localhost:27017/${config.dbName}`, options: { user: 'admin', pass: 'admin', authSource: 'admin', useNewUrlParser: true, useCreateIndex: true, }, }; // 路由设置 config.routePrefix = '/freeAdminLog/api'; // 接收队列名称 config.queue = 'freeAdmin/server-logs'; // 发送队列名称 config.sendQueue = { user: 'freeAdmin/server-user', }; return { ...config, ...userConfig, }; };