0.1.0 • Published 9 years ago
express-slack-postgres-store v0.1.0
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
}));0.1.0
9 years ago