Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tyler-johnson/couchdb-jwt-redis-store
A Redis-backed session store for couchdb-jwt.
https://github.com/tyler-johnson/couchdb-jwt-redis-store
Last synced: 5 days ago
JSON representation
A Redis-backed session store for couchdb-jwt.
- Host: GitHub
- URL: https://github.com/tyler-johnson/couchdb-jwt-redis-store
- Owner: tyler-johnson
- License: mit
- Created: 2016-02-16T00:56:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-02-22T21:07:17.000Z (over 8 years ago)
- Last Synced: 2024-10-12T05:54:29.246Z (28 days ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - tyler-johnson/couchdb-jwt-redis-store - A Redis-backed session store for couchdb-jwt. (others)
README
# CouchDB JWT Redis Session Store
[![npm](https://img.shields.io/npm/v/couchdb-jwt-store-redis.svg)](https://www.npmjs.com/package/couchdb-jwt-store-redis) [![David](https://img.shields.io/david/tyler-johnson/couchdb-jwt-redis-store.svg)](https://david-dm.org/tyler-johnson/couchdb-jwt-redis-store) [![Build Status](https://travis-ci.org/tyler-johnson/couchdb-jwt-redis-store.svg?branch=master)](https://travis-ci.org/tyler-johnson/couchdb-jwt-redis-store)
This is a Redis-backed session store for use with [CouchDB JWT](http://ghub.io/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:
```sh
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.
```js
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](http://ghub.io/redis) with the client parameter.
```js
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.
```sh
couchdbjwt --session.store couchdb-jwt-store-redis
```