koa2-mysql-session
v0.1.0
Published
采用es6语法, 将session信息保存在 mysql 数据库里的库
Downloads
3
Readme
this is a simple training lib which copy from: https://github.com/tb01923/koa-mysql-session and update to use async / await
example:
const
Koa = require('koa'),
session = require('koa-session')
MysqlStore = require('koa2-mysql-session'),
app = new Koa()
mysqlConfig = {
host: 'localhost',
user: 'root',
password: '123456',
database: 'demo'
}
app.use(session({store: new MysqlStore(mysqlConfig)}, app))