import { Bus } from '@node-ts/bus-core'
import { PostgresPersistence, PostgresConfiguration } from '@node-ts/bus-postgres'
const postgresConfiguration: PostgresConfiguration = {
connection: {
connectionString: 'postgres://postgres:password@localhost:5432/postgres'
},
schemaName: 'workflows'
}
const postgresPersistence = new PostgresPersistence(postgresConfiguration)
await Bus
.configure()
.withPersistence(postgresPersistence)
.initialize()