123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- import { MidwayConfig } from '@midwayjs/core';
- const ip = '127.0.0.1';
- const project = 'material';
- const mongodb = 'material_v1';
- export default {
- // use for cookie sign key, should change to your own and keep security
- keys: '1672292154640_5493',
- koa: {
- globalPrefix: `/${project}/v1/api`,
- },
- swagger: {
- swaggerPath: `/${project}/v1/api/doc`,
- },
- mongoose: {
- dataSource: {
- default: {
- uri: `mongodb://${ip}:27017/${mongodb}`,
- options: {
- user: 'admin',
- pass: 'admin',
- authSource: 'admin',
- useNewUrlParser: true,
- },
- entities: ['./entity'],
- },
- },
- },
- axios: {
- clients: {
- file: {
- baseURL: 'http://broadcast.waityou24.cn',
- //表明返回服务器返回的数据类型
- responseType: 'arraybuffer',
- headers: {
- 'Content-Type': 'application/json; application/octet-stream',
- },
- },
- },
- },
- export: {
- root_path: '/mnt/server/service-file/upload/material/',
- file_type: 'material',
- },
- wechatSetting: {
- // 耗材
- materialApp: {
- appid: 'wx23c71bee5876d1b9',
- secret: 'aa942570f1d056adf7891a32eb87a818',
- },
- },
- } as MidwayConfig;
|