mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2026-01-09 05:18:17 +00:00
35 lines
788 B
TypeScript
35 lines
788 B
TypeScript
import { CoolFileConfig, MODETYPE } from '@cool-midway/file';
|
||
import { MidwayConfig } from '@midwayjs/core';
|
||
import * as fsStore from 'cache-manager-fs-hash';
|
||
|
||
export default {
|
||
// 修改成你自己独有的key
|
||
keys: 'cool-admin for node',
|
||
koa: {
|
||
port: 8001,
|
||
},
|
||
// 模板渲染
|
||
view: {
|
||
mapping: {
|
||
'.html': 'ejs',
|
||
},
|
||
},
|
||
// 缓存 可切换成其他缓存如:redis http://midwayjs.org/docs/extensions/cache
|
||
cache: {
|
||
store: fsStore,
|
||
options: {
|
||
path: 'cache',
|
||
ttl: -1,
|
||
},
|
||
},
|
||
// cool配置
|
||
cool: {
|
||
file: {
|
||
// 上传模式 本地上传或云存储
|
||
mode: MODETYPE.LOCAL,
|
||
// 本地上传 文件地址前缀
|
||
domain: 'http://127.0.0.1:8001',
|
||
} as CoolFileConfig,
|
||
},
|
||
} as unknown as MidwayConfig;
|