123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- /* eslint valid-jsdoc: "off" */
- 'use strict';
- const { jwt } = require('./config.secret');
- /**
- * @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 + '_1611133759961_4798';
- // add your middleware config here
- config.middleware = [];
- // add your user config here
- const userConfig = {
- // myAppName: 'egg',
- };
- config.cluster = {
- listen: {
- port: 9101,
- },
- };
- config.jwt = {
- ...jwt,
- expiresIn: '1d',
- issuer: 'test',
- };
- config.dbName = 'new-platform';
- config.mongoose = {
- url: `mongodb://localhost:27017/${config.dbName}`, //106.12.161.200
- options: {
- user: 'admin',
- pass: 'admin',
- authSource: 'admin',
- useNewUrlParser: true,
- useCreateIndex: true,
- },
- };
- config.amqp = {
- client: {
- hostname: '127.0.0.1',
- username: 'visit',
- password: 'visit',
- vhost: 'platform',
- },
- app: true,
- agent: true,
- };
- config.redis = {
- client: {
- port: 6379, // Redis port
- host: '127.0.0.1', // Redis host
- password: '123456',
- db: 1,
- },
- };
- 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', // 微信网关地址
- patent: {
- appid: 'wx42e8aeda4a381fa6',
- appSecret: 'd5f8bf2a4a37bd86f45fbff3c7d9fd3c',
- },
- kjzl: {
- appid: 'wxcf1b5457939b0932',
- appSecret: 'f9a947c4a11f5304fc0bcabef98093d8',
- },
- jlstcompany: {
- appid: 'wx696d9dc3f5c25e42',
- appSecret: 'b794494632f448f56a6e722f57b42bc9',
- },
- jlstcoupons: {
- appid: 'wxc98fa7131638a37c',
- appSecret: 'f55f1734ee919a8e4eac64aea67f350a',
- },
- free: {
- appid: 'wxdf3ed83c095be97a',
- appSecret: 'd85dbe075c090cb12ce416bbda8e698c',
- },
- };
- return {
- ...config,
- ...userConfig,
- };
- };
|