bottender-session-sql
v0.1.1
Published
SQL Session Store for Bottender.
Downloads
4
Readme
bottender-session-sql
SQL Session Store for Bottender.
Installation
npm install bottender-session-sql
Usage
Publish migrations:
npx bottender-session-sql migrations:publish
Code example:
const { ConsoleBot } = require('bottender');
const SQLSessionStore = require('bottender-session-sql');
const bot = new ConsoleBot({
sessionStore: new SQLSessionStore({
client: 'pg',
connection: {
host: '127.0.0.1',
user: 'your_database_user',
password: 'your_database_password',
database: 'myapp_test',
},
migrations: {
tableName: 'migrations',
},
}),
});
Options
config
Knex config.
expiresIn
Default: 365 * 24 * 60
.
Examples
See examples folder.
License
MIT © Yoctol