-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathormconfig.ts
31 lines (26 loc) · 908 Bytes
/
ormconfig.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
+-----------------------------------------------------------------------------------------------------------------------
| Author: atzcl <atzcl0310@gmail.com> https://github.com/atzcl
+-----------------------------------------------------------------------------------------------------------------------
| typeorm cli config
|
*/
import { customizeConfig } from './src/config/config.default';
const dbConfig = customizeConfig.sequelize;
const typeormConfig = {
type: dbConfig.dialect,
host: dbConfig.host,
port: dbConfig.port,
username: dbConfig.username,
password: dbConfig.password,
database: dbConfig.database,
timezone: dbConfig.timezone,
logging: true,
charset: 'UTF8MB4_UNICODE_CI',
entities: ['src/app/modules/**/Models/*{.ts,.js}'],
migrations: ['src/app/modules/**/Migrations/*{.ts,.js}'],
cli: {
migrationsDir: 'src/migration',
},
};
export = typeormConfig;