1.1.0 ā€¢ Published 3 months ago

@node-ts/bus-postgres v1.1.0

Weekly downloads
342
License
MIT
Repository
github
Last release
3 months ago

@node-ts/bus-postgres

A Postgres based persistence for workflow storage in @node-ts/bus

šŸ”„ View our docs at https://bus.node-ts.com šŸ”„

šŸ¤” Have a question? Join the Discussion šŸ¤”

Installation

Install all packages and their dependencies

npm install @node-ts/bus-postgres

Configure a new Postgres persistence and register it with Bus:

import { Bus } from '@node-ts/bus-core'
import { PostgresPersistence, PostgresConfiguration } from '@node-ts/bus-postgres'

const configuration: PostgresConfiguration = {
  connection: {
    connectionString: 'postgres://postgres:password@localhost:5432/postgres'
  },
  schemaName: 'workflows'
}
const postgresPersistence = new PostgresPersistence(configuration)

// Configure bus to use postgres as a persistence
const run = async () => {
  const bus = Bus
    .configure()
    .withPersistence(postgresPersistence)
    .build()
  await bus.initialize()
  await bus.start()
}
run.then(() => void)

Configuration Options

The Postgres persistence has the following configuration:

  • connection (required) Connection pool settings for the application to connect to the postgres instance
  • schemaName (required) The schema name to create workflow tables under. This can be the 'public' default from postgres, but it's recommended to use 'workflows' or something similar to group all workflow concerns in the one place. This schema will be created if it doesn't already exist.

Development

Local development can be done with the aid of docker to run the required infrastructure. To do so, run:

docker run --name bus-postgres -e POSTGRES_PASSWORD=password -p 6432:5432 -d postgres
1.1.0

3 months ago

1.1.0-beta.0

3 months ago

0.5.13

9 months ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

2 years ago

0.5.10

2 years ago

0.5.11

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

0.5.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.12

2 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

1.0.3

3 years ago

1.0.0-alpha.0

3 years ago

0.5.9

3 years ago

0.5.8

3 years ago

0.5.7

3 years ago

0.5.6

3 years ago

0.5.5

3 years ago

0.5.4

3 years ago

0.5.3

4 years ago

0.5.2

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.10

4 years ago

0.4.9

4 years ago

0.4.8

4 years ago

0.4.5

4 years ago

0.4.7

4 years ago

0.4.6

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.10

5 years ago

0.3.9

5 years ago

0.3.8

5 years ago

0.3.7

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.2

5 years ago

0.3.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.16

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago