Skip to content

Commit

Permalink
fix(subscribers): respect TypeORM configuration option (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
goldcaddy77 authored Mar 18, 2019
1 parent 0e2f65c commit 42f0e58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/code-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/torm/createConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 42f0e58

Please sign in to comment.