web-backset.cn/apps/server/src/config/config.local.ts
2023-02-17 00:10:06 +08:00

35 lines
902 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 { 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;
};