koa-2-ioredis
Advanced tools
Comparing version 1.0.0 to 1.1.0
const debug = require('debug')('koa2:ioredis'); | ||
const Redis = require('ioredis'); | ||
const config = require('config'); | ||
const redis = require('./redis'); | ||
const redis = new Redis(config.redis); | ||
module.exports = () => async (ctx, next) => { | ||
ctx.redis = redis; | ||
debug('ctx.redis'); | ||
debug('Redis created'); | ||
await next(); | ||
}; |
@@ -5,3 +5,3 @@ { | ||
"repository": "evheniy/koa-2-ioredis", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"scripts": { | ||
@@ -8,0 +8,0 @@ "lint": "eslint index.js tests", |
5950
12