diff --git a/src/core/code-generator.ts b/src/core/code-generator.ts index 385b1856..01a46e12 100644 --- a/src/core/code-generator.ts +++ b/src/core/code-generator.ts @@ -135,7 +135,7 @@ module.exports = { namingStrategy: new SnakeNamingStrategy(), password: process.env.TYPEORM_PASSWORD, port: parseInt(process.env.TYPEORM_PORT || '', 10) || 5432, - subscribers: ['src/**/*.model.ts'], + subscribers: process.env.TYPEORM_SUBSCRIBERS || ['src/**/*.model.ts'], synchronize: process.env.TYPEORM_SYNCHRONIZE === 'true', type: 'postgres', username: process.env.TYPEORM_USERNAME diff --git a/src/torm/createConnection.ts b/src/torm/createConnection.ts index e9981b7e..74fb41b6 100644 --- a/src/torm/createConnection.ts +++ b/src/torm/createConnection.ts @@ -46,7 +46,7 @@ function getBaseConfig() { namingStrategy: new SnakeNamingStrategy(), password: process.env.TYPEORM_PASSWORD, port: parseInt(process.env.TYPEORM_PORT || '', 10) || 5432, - subscribers: ['src/**/*.model.ts'], + subscribers: process.env.TYPEORM_SUBSCRIBERS || ['src/**/*.model.ts'], synchronize: process.env.TYPEORM_SYNCHRONIZE === 'true', type: 'postgres', username: process.env.TYPEORM_USERNAME