Skip to content
This repository has been archived by the owner on May 28, 2023. It is now read-only.

Commit

Permalink
feat(worker): create provider for app usage
Browse files Browse the repository at this point in the history
  • Loading branch information
btkostner committed May 2, 2018
1 parent 90bbffd commit acd2b1f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export class App extends Container {
*/
protected static providers: ContainerModule[] = [
require('../repo/provider').provider,
require('../worker/provider').provider,
require('./database/provider').provider,
require('./log/provider').provider,
require('./queue/provider').provider,
Expand Down
13 changes: 13 additions & 0 deletions src/worker/provider.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* houston/src/worker/provider.ts
* Provides the app with the main worker classes
*/

import { ContainerModule } from 'inversify'

import { Server, Worker } from './index'

export const provider = new ContainerModule((bind) => {
bind<Server>(Server).toConstructor(Server)
bind<Worker>(Worker).toConstructor(Worker)
})

0 comments on commit acd2b1f

Please sign in to comment.