A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/KualiCo/koa-generic-session-rethinkdb below:

KualiCo/koa-generic-session-rethinkdb: Session store for rethinkdb and koa-generic-session module

koa-generic-session-rethinkdb

This is a module for storing sessions from the koa-generic-session module in RethinkDB.

npm i --save koa-generic-session-rethinkdb
var koa = require('koa')
// for use with koa-generic-session
var session = require('koa-generic-session')
var RethinkSession = require('koa-generic-session-rethinkdb')
var rethinkdb = require('rethinkdbdash')

var connection = rethinkdb({
  host: 'localhost',
  port: 28015
})

var sessionStore = new RethinkSession({connection: connection})
// create the db, table and indexes to store sessions
sessionStore.setup()



var app = koa()
// used for cookie stuffs
app.keys = ['foo', 'bar']

app.use(session({
  store: sessionStore
})

Return a new RethinkSession store. opts are options.

Run the tests with npm test. Please add tests to cover new functionality.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4