Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

couchdb-jwt-store-redis

2.0.0 • Public • Published

CouchDB JWT Redis Session Store

npm David Build Status

This is a Redis-backed session store for use with CouchDB JWT. If performance matters to you, this session store is recommended over the built-in CouchDB store.

Install

Install with CouchDB JWT using NPM:

npm i couchdb-jwt couchdb-jwt-store-redis --save

Usage

Pass to CouchDB JWT as a session store. Redis connection details can be passed as additional parameters.

var RedisStore = require("couchdb-jwt-store-redis");
var couchdbjwt = require("couchdb-jwt")({
    session: {
        store: RedisStore,
        url: "redis://127.0.0.1:6379"
    }
});
 
couchdbjwt.listen(3000);

You can pass in an existing Redis client from node_redis with the client parameter.

var RedisStore = require("couchdb-jwt-store-redis");
var client = redis.createClient();
 
var couchdbjwt = require("couchdb-jwt")({
    session: {
        store: RedisStore,
        client: client
    }
});

This store is also compatible with the CouchDB JWT cli.

couchdbjwt --session.store couchdb-jwt-store-redis

Keywords

none

install

npm i couchdb-jwt-store-redis

Downloadsweekly downloads

4

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability