Skip to content

Commit 80ffefa

Browse files
authored
Fixed PostgreSQL transport example (#55)
1 parent 82ac292 commit 80ffefa

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

packages/bus-postgres/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Once installed, load the `BusPostgresModiule` to your inversify container alongs
1818
```typescript
1919
import { Container } from 'inversify'
2020
import { LoggerModule } from '@node-ts/logger-core'
21-
import { BusModule } from '@node-ts/bus-core'
22-
import { WorkflowModule } from '@node-ts/bus-workflow'
23-
import { BUS_POSTGRES_SYMBOLS, BusPostgresModule } from '@node-ts/bus-postgres'
21+
import { BUS_SYMBOLS, BusModule, ApplicationBootstrap } from '@node-ts/bus-core'
22+
import { BUS_WORKFLOW_SYMBOLS, WorkflowRegistry } from '@node-ts/bus-workflow'
23+
import { BUS_POSTGRES_SYMBOLS, BusPostgresModule, PostgresConfiguration } from '@node-ts/bus-postgres'
2424

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

3838
// Run the application
3939
const application = async () => {
40-
workflows = container.get<WorkflowRegistry>(BUS_WORKFLOW_SYMBOLS.WorkflowRegistry)
40+
const workflows = container.get<WorkflowRegistry>(BUS_WORKFLOW_SYMBOLS.WorkflowRegistry)
4141
workflows.register(TestWorkflow, TestWorkflowData) // Register all workflows here
4242
await workflows.initializeWorkflows()
4343

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

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

0 commit comments

Comments
 (0)