web-backset.cn/apps/server/src/config/config.local.ts

35 lines
902 B
TypeScript
Raw Normal View History

2023-02-16 17:58:27 +08:00
import { MidwayAppInfo, MidwayConfig } from '@midwayjs/core';
export default (appInfo: MidwayAppInfo): MidwayConfig => {
return {
typeorm: {
dataSource: {
default: {
/**
*
*/
type: 'mysql',
host: 'mozzie.cn',
port: 6033,
username: 'root',
password: 'cr654654.',
database: 'backset',
synchronize: true, // 如果第一次使用,不存在表,有同步的需求可以写 true注意会丢数据
logging: false,
// 扫描形式, 配置实体模型 entities: [Photo]
entities: ['**/entity/*.entity{.ts,.js}'],
},
},
},
redis: {
client: {
port: 16379, // Redis port
host: 'mozzie.cn', // Redis host
password: 'cr654654.',
db: 0,
},
},
} as MidwayConfig;
};