mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2026-01-06 02:48:13 +00:00
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { CoolConfig } from '@cool-midway/core';
|
||
import { MidwayConfig } from '@midwayjs/core';
|
||
|
||
/**
|
||
* 本地开发 npm run dev 读取的配置文件
|
||
*/
|
||
export default {
|
||
typeorm: {
|
||
dataSource: {
|
||
default: {
|
||
type: 'mysql',
|
||
host: '127.0.0.1',
|
||
port: 3306,
|
||
username: 'root',
|
||
password: '123456',
|
||
database: 'cool',
|
||
// 自动建表 注意:线上部署的时候不要使用,有可能导致数据丢失
|
||
synchronize: true,
|
||
// 打印日志
|
||
logging: false,
|
||
// 字符集
|
||
charset: 'utf8mb4',
|
||
// 是否开启缓存
|
||
cache: true,
|
||
// 实体路径
|
||
entities: ['**/modules/*/entity'],
|
||
},
|
||
},
|
||
},
|
||
cool: {
|
||
// 实体与路径,跟生成代码、前端请求、swagger文档相关 注意:线上不建议开启,以免暴露敏感信息
|
||
eps: true,
|
||
// 是否自动导入模块数据库
|
||
initDB: true,
|
||
// 判断是否初始化的方式
|
||
initJudge: 'db',
|
||
// 是否自动导入模块菜单
|
||
initMenu: true,
|
||
} as CoolConfig,
|
||
} as MidwayConfig;
|