1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- /* 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 + '_1666686710616_3993';
- config.appName = '天恩活泉商城-服务';
- // add your middleware config here
- config.middleware = [ 'setUserFromToken' ];
- config.checkToken = {
- enable: false,
- };
- // 进程设置
- config.cluster = {
- listen: {
- port: 12212,
- },
- };
- // 数据库设置
- config.dbName = 'point_shopping-dev';
- config.mongoose = {
- url: `mongodb://120.48.146.1:27017/${config.dbName}`, // 120.48.146.1 127.0.0.1
- options: {
- user: 'admin',
- pass: 'admin',
- authSource: 'admin',
- useNewUrlParser: true,
- useCreateIndex: true,
- useFindAndModify: true,
- allowDiskUse: true,
- },
- };
- // redis设置
- config.redis = {
- client: {
- port: 6379, // Redis port
- host: '127.0.0.1', // Redis host
- password: '123456',
- db: 2,
- },
- };
- // mq设置
- config.amqp = {
- client: {
- hostname: 'broadcast.waityou24.cn',
- username: 'tehqDev',
- password: 'tehqDev',
- vhost: 'tehqDev',
- },
- app: true,
- agent: true,
- };
- // jwt设置
- config.jwt = {
- ...jwt,
- expiresIn: '1d',
- issuer: 'shopping',
- };
- // 路由设置
- config.routePrefix = '/dev/point/zr/v1/api';
- config.emailConfig = {
- config: 'free',
- };
- config.smsConfig = {
- config: 'free',
- };
- // 中间件
- config.requestLog = {
- toMongoDB: true,
- };
- config.redisKey = {
- orderKeyPrefix: 'zrOrderKey:',
- };
- config.redisTimeout = 3600;
- config.wxPayConfig = 'pointApp';
- // add your user config here
- const userConfig = {
- // myAppName: 'egg',
- };
- return {
- ...config,
- ...userConfig,
- };
- };
|