Skip to content

Commit

Permalink
chore(framework): add note about how to disable broker, since it auto…
Browse files Browse the repository at this point in the history
…matically starts now
  • Loading branch information
marcj committed Oct 23, 2023
1 parent 6a89a08 commit 25da2d0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/framework/src/broker/listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class BrokerListener {
async onMainBootstrap() {
if (this.startOnBootstrap) {
await this.brokerServer.start();
this.logger.log(`Broker started at <green>${this.listen}</green>`);
this.logger.log(`Broker started at <green>${this.listen}</green>. Disable with "FrameworkModule({broker: {startOnBootstrap: false}})"`);
}
}

Expand Down
15 changes: 9 additions & 6 deletions packages/framework/tests/application-server.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,9 @@ describe('application-server', () => {
const app = new App({
controllers: [MyController],
imports: [
new FrameworkModule()
.setup((module, config) => {
config.broker.startOnBootstrap = false;
})
new FrameworkModule({
broker: { startOnBootstrap: false }
})
]
});
const applicationServer = app.get(ApplicationServer);
Expand Down Expand Up @@ -220,7 +219,9 @@ describe('application-server', () => {
useValue: rpcServerMock,
}
],
imports: [new FrameworkModule()]
imports: [new FrameworkModule({
broker: { startOnBootstrap: false }
})]
});
const applicationServer = app.get(ApplicationServer);
await applicationServer.start();
Expand All @@ -240,7 +241,9 @@ describe('application-server', () => {

const app = new App({
controllers: [MyController],
imports: [new FrameworkModule()]
imports: [new FrameworkModule({
broker: { startOnBootstrap: false }
})]
});
const applicationServer = app.get(ApplicationServer);
await applicationServer.start();
Expand Down

0 comments on commit 25da2d0

Please sign in to comment.