Skip to content

Commit

Permalink
refactor: share emitter with the BaseEvent class
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Oct 17, 2023
1 parent fd6234a commit 0f75edd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions providers/app_provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import { Config } from '../modules/config.js'
import { Logger } from '../modules/logger.js'
import { BaseEvent } from '../modules/events.js'
import { Encryption } from '../modules/encryption.js'
import { Router, Server } from '../modules/http/main.js'
import type { ApplicationService, LoggerService } from '../src/types.js'
Expand Down Expand Up @@ -151,4 +152,8 @@ export default class AppServiceProvider {
this.registerRouter()
this.registerBodyParserMiddleware()
}

async boot() {
BaseEvent.useEmitter(await this.app.container.make('emitter'))
}
}

0 comments on commit 0f75edd

Please sign in to comment.