cool-admin-midway/src/config/config.default.ts
2022-03-14 14:46:21 +08:00

35 lines
788 B
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 { 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;