koa redis:具有Sentinel和集群支持的Koa会话中间件缓存的Redis存储 源码
考阿雷迪斯 具有Sentinel和集群支持的Koa会话中间件/缓存的Redis存储 v4.0.0 +现在使用ioredis并支持Sentinel和Cluster! 目录 安装 : npm install koa-redis : yarn add koa-redis 用法 koa-redis与 (koa的通用会话中间件)配合使用。 有关更多示例,请参见的。 基本的 const session = require ( 'koa-generic-session' ) ; const redisStore = require ( 'koa-redis' ) ; const koa = require ( 'koa' ) ; const app = koa ( ) ; app . keys = [ 'keys' , 'keykeys' ] ; app . use ( session ( { store : redisStore ( { // Options specified here } ) } ) ) ; app . use ( function * ( ) {
下载地址
用户评论