Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@node-ts/bus-postgres

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@node-ts/bus-postgres

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

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
986
decreased by-27.66%
Maintainers
1
Weekly downloads
 
Created
Source

@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

Keywords

FAQs

Package last updated on 06 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc