123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- /* eslint valid-jsdoc: "off" */
- 'use strict';
- /**
- * @param {Egg.EggAppInfo} appInfo app info
- */
- const { jwt } = require('./config.secret');
- const WechatAPI = require('co-wechat-api');
- 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 + '_1629889590707_2425';
- // add your middleware config here
- config.middleware = [ 'tokenCheck', 'killColumns', 'operaLogs' ];
- // add your user config here
- const userConfig = {
- // myAppName: 'egg',
- };
- config.cluster = {
- listen: {
- port: 6100,
- },
- };
- config.jwt = {
- ...jwt,
- expiresIn: '1d',
- issuer: 'baoan',
- };
- config.dbServerPort = '8090';
- config.dbServerIp = 'baoan.fwedzgc.com'; // 106.12.161.200
- config.wxServer = 'http://baoan.fwedzgc.com:8090';
- config.export = {
- root_path: 'D:\\temp\\',
- domain: 'http://127.0.0.1',
- };
- config.import = {
- domain: 'http://127.0.0.1',
- root_path: 'D:\\temp\\',
- };
- config.wxConfig = {
- appid: 'wxf7c766a58ace4bd6',
- secret: '615597e3b2e36314740f8954aa53b10d',
- };
- config.wx = new WechatAPI(
- config.wxConfig.appid,
- config.wxConfig.secret
- );
- config.wxAppConfig = {
- appid: 'wx68378872c2d354e9',
- secret: '14298fa90cbfe41f7726afcb6097aca2',
- };
- config.wxApp = new WechatAPI(
- config.wxAppConfig.appid,
- config.wxAppConfig.secret
- );
- config.dbName = 'wxCache';
- config.mongoose = {
- url: `mongodb://localhost:27017/${config.dbName}`,
- options: {
- user: 'c##baoandba',
- pass: 'baoan2021',
- authSource: 'admin',
- useNewUrlParser: true,
- useCreateIndex: true,
- },
- };
- // mq设置
- // config.amqp = {
- // client: {
- // hostname: '127.0.0.1',
- // username: 'visit',
- // password: 'visit',
- // vhost: 'platform',
- // },
- // app: true,
- // agent: true,
- // };
- // redis设置
- // config.redis = {
- // client: {
- // port: 6379, // Redis port
- // host: '127.0.0.1', // Redis host
- // password: '123456',
- // db: 1,
- // },
- // };
- return {
- ...config,
- ...userConfig,
- };
- };
|