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; };