1.1.3 • Published 4 years ago

botbuilder-storage-postgres v1.1.3

Weekly downloads
23
License
MIT
Repository
github
Last release
4 years ago

[Github All Releases]FOSSA Status () License: MIT Twitter FOSSA Status

State Storage for Bot Framework using Postgres

This project provides a Postgres storage mechanism for Bot Framework-JS SDK V4.

It allows you to store bot state in Postgres, so that you can scale out your bot, and be more resilient to bot server failures.

For more information about the botbuilder community, please visit the botbuilder community project.

Requirements

  • NodeJS 10.x is a requirement to install dependencies, build and run tests.
  • Postgres database.

Installation

npm install botbuilder-storage-postgres

Sample Usage

const postgresStorage = new PostgresStorage({
  uri : process.env.POSTGRES_URI
});

const conversationState = new ConversationState(postgresStorage);

Where POSTGRES_URI is set in .env or your secrets store of choice according to LibPQ Connection String standards. E.g.

postgresql://[user[:password]@][netloc][:port][,...][/dbname][?param1=value1&...]

Configuration Options

FieldDescriptionValue
uriThe Postgres connection URIRequired
collectionThe name you'd like given to the table the bot will reference.Optional
loggingWhether or not you want logging of transactions enabled.Optional

Caution: you should not store postgres URI in code! Get the uri from a configuration such as environment variable or a secrets store in your environment. It may contain sensitive password in the clear and should never be stored in code!

See Postgres Connection URI format in the official documentation to learn more about the connection uri parameter value.


*

  • botbuilder-storage-postgres
  • Copyright 2019 TD Ameritrade. Released under the terms of the MIT license.

1.1.3

4 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago