Skip to content

Commit

Permalink
Fixed PostgreSQL transport example (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zehelein authored Mar 1, 2020
1 parent 82ac292 commit 80ffefa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/bus-postgres/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Once installed, load the `BusPostgresModiule` to your inversify container alongs
```typescript
import { Container } from 'inversify'
import { LoggerModule } from '@node-ts/logger-core'
import { BusModule } from '@node-ts/bus-core'
import { WorkflowModule } from '@node-ts/bus-workflow'
import { BUS_POSTGRES_SYMBOLS, BusPostgresModule } from '@node-ts/bus-postgres'
import { BUS_SYMBOLS, BusModule, ApplicationBootstrap } from '@node-ts/bus-core'
import { BUS_WORKFLOW_SYMBOLS, WorkflowRegistry } from '@node-ts/bus-workflow'
import { BUS_POSTGRES_SYMBOLS, BusPostgresModule, PostgresConfiguration } from '@node-ts/bus-postgres'

const container = new Container()
container.load(new LoggerModule())
Expand All @@ -37,11 +37,11 @@ container.bind(BUS_POSTGRES_SYMBOLS.PostgresConfiguration).toConstantValue(confi

// Run the application
const application = async () => {
workflows = container.get<WorkflowRegistry>(BUS_WORKFLOW_SYMBOLS.WorkflowRegistry)
const workflows = container.get<WorkflowRegistry>(BUS_WORKFLOW_SYMBOLS.WorkflowRegistry)
workflows.register(TestWorkflow, TestWorkflowData) // Register all workflows here
await workflows.initializeWorkflows()

bootstrap = container.get<ApplicationBootstrap>(BUS_SYMBOLS.ApplicationBootstrap)
const bootstrap = container.get<ApplicationBootstrap>(BUS_SYMBOLS.ApplicationBootstrap)
await bootstrap.initialize(container)
}
application
Expand All @@ -54,4 +54,4 @@ Local development can be done with the aid of docker to run the required infrast

```bash
docker run --name bus-postgres -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgres
```
```

0 comments on commit 80ffefa

Please sign in to comment.