1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- import { MidwayConfig } from '@midwayjs/core';
- const ip = 'host.docker.internal';
- // const redisIp = '172.17.0.1'; // midway里用上面的ip会被转变成127.0.0.1
- const baseDB = 'shoppingOne';
- const dbName = 'shoppingOne_chat';
- const mqUser = 'shoppingOne';
- const routePrefix = '/point/one/chat/v1/api';
- const suffix = '_local';
- export default {
- // use for cookie sign key, should change to your own and keep security
- keys: '1669597198171_1000',
- koa: {
- port: 12214,
- globalPrefix: routePrefix,
- },
- webSocket: {
- clientTracking: true,
- },
- mongoose: {
- dataSource: {
- default: {
- uri: `mongodb://${ip}:27017/${dbName}`,
- options: {
- user: 'admin',
- pass: 'admin',
- authSource: 'admin',
- useNewUrlParser: true,
- },
- entities: ['./entity/chat'],
- },
- base: {
- uri: `mongodb://${ip}:27017/${baseDB}`,
- options: {
- user: 'admin',
- pass: 'admin',
- authSource: 'admin',
- useNewUrlParser: true,
- },
- entities: ['./entity/base'],
- },
- },
- },
- jwt: {
- secret: 'Ziyouyanfa!@#',
- },
- axios: {
- clients: {
- wechat: {
- baseURL: 'https://broadcast.waityou24.cn/wechat/api', // http://127.0.0.1:14001/wechat/api
- },
- base: {
- baseURL: 'https://broadcast.waityou24.cn/point/one/v1/api', // http://127.0.0.1:12211
- },
- },
- },
- rabbitmq: {
- url: `amqp://${mqUser}:${mqUser}@${ip}/${mqUser}`,
- },
- mqConfig: {
- normal: {
- ex: `t_m${suffix}`,
- },
- timeout: 1, //min
- },
- } as MidwayConfig;
|