123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- /* 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 + '_1625713704561_5494';
- // add your middleware config here
- config.middleware = [];
- // add your user config here
- const userConfig = {
- // myAppName: 'egg',
- };
- config.cluster = {
- listen: {
- port: 11111,
- },
- };
- config.appName = 'market';
- config.dbName = 'market';
- config.mongoose = {
- url: `mongodb://localhost:27017/${config.dbName}`,
- options: {
- // user: 'admin',
- // pass: '111111',
- // authSource: 'admin',
- // useNewUrlParser: true,
- // useCreateIndex: true,
- },
- };
- config.amqp = {
- client: {
- hostname: '127.0.0.1',
- username: 'test',
- password: '123456',
- vhost: 'test',
- },
- app: true,
- agent: true,
- };
- config.jwt = {
- ...jwt,
- expiresIn: '1d',
- issuer: 'market',
- };
- config.redis = {
- client: {
- port: 6379, // Redis port
- host: '127.0.0.1', // Redis host
- password: '123456',
- db: 1,
- },
- };
- return {
- ...config,
- ...userConfig,
- };
- };
|