express-slack-postgres-store

0.1.0 • Public • Published

Slack Express Postgres Store

This is a super simple store implementation for express-slack.

Install

npm install --save express-slack-postgres-store

Create store database table

The database table used by the store module must be created. Example creating a database table named store:

CREATE TABLE IF NOT EXISTS store (
  id char(50) NOT NULL PRIMARY KEY,
  data jsonb
);

Usage

const dataStore = require("express-slack-postgres-store")({
  database: process.env.DATABASE_URL + "?ssl=true",
  table: "store"
});
Argument Description
database Postgres connection string
table Database table name for data store

Now use the initialized variable as a data store when configuring express-slack:

app.use('/slack', slack({
  scope: SCOPE,
  token: TOKEN,
  store: dataStore
  client_id: CLIENT_ID,
  client_secret: CLIENT_SECRET
}));

Package Sidebar

Install

npm i express-slack-postgres-store

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • stpe