Files
37duAutomation/desktop/controlplane-next/server/src/config/config.default.ts
T
puddy f0a94bf523 build(desktop): 升级 electron-shell 版本至 1.6.3 并调整插件执行超时配置
- 插件执行超时默认延长至 6 小时,支持插件单独配置超时时间
- 新增插件根目录迁移逻辑,解决旧版权限问题
- 新增多个服务端实体、DTO、配置模块等基础代码
- 新增插件 UI 模板及相关静态资源
2026-10-15 11:38:45 +08:00

92 lines
2.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { CoolConfig } from '@cool-midway/core';
import { MidwayConfig } from '@midwayjs/core';
import { CoolCacheStore } from '@cool-midway/core';
import * as path from 'path';
import { pCachePath, pUploadPath } from '../comm/path';
import { availablePort } from '../comm/port';
// redis缓存(37du 启用:本地/生产共用 Redis 缓存,支持多实例)
import { redisStore } from 'cache-manager-ioredis-yet';
export default {
// 确保每个项目唯一,项目首次启动会自动生成
keys: '585d0777-4f66-4cf2-a5d5-b8c3831f7441',
koa: {
port: availablePort(8001),
},
// 开启异步上下文管理
asyncContextManager: {
enable: true,
},
// 静态文件配置
staticFile: {
buffer: true,
dirs: {
default: {
prefix: '/',
dir: path.join(__dirname, '..', '..', 'public'),
},
static: {
prefix: '/upload',
dir: pUploadPath(),
},
},
},
// 文件上传
upload: {
fileSize: '200mb',
whitelist: null,
},
// 缓存:Redis(37du 启用)。如本地无 Redis,可换回下方 CoolCacheStore 文件缓存
cacheManager: {
clients: {
default: {
store: redisStore,
options: {
port: 6379,
host: '127.0.0.1',
password: '',
ttl: 0,
db: 0,
},
},
},
},
// cacheManager: {
// clients: {
// default: {
// store: CoolCacheStore,
// options: {
// path: pCachePath(),
// ttl: 0,
// },
// },
// },
// },
cool: {
// 已经插件化,本地文件上传查看 plugin/config.ts,其他云存储查看对应插件的使用
file: {},
// 是否开启多租户
tenant: {
// 是否开启多租户
enable: false,
// 需要过滤多租户的url, 支持通配符, 如/admin/**/* 表示admin模块下的所有接口都进行多租户过滤
urls: [],
},
// 国际化配置
i18n: {
// 是否开启
enable: false,
// 语言
languages: ['zh-cn', 'zh-tw', 'en'],
},
// crud配置
crud: {
// 插入模式,save不会校验字段(允许传入不存在的字段),insert会校验字段
upsert: 'save',
// 软删除
softDelete: true,
},
} as CoolConfig,
} as MidwayConfig;