New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

koa-2-ioredis

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-2-ioredis

ioredis midleware for koa 2 application


Version published
Weekly downloads
1
decreased by-80%
Maintainers
1
Weekly downloads
 
Created

Koa.js 2 ioredis middleware

ioredis midleware for koa 2 application

Build Status Coverage Status

Installation

npm i -S koa-2-ioredis

Documentation

app.js:

const Koa = require('koa');
const app = new Koa();
const ioredis = require('koa-2-ioredis');
app.use(ioredis());

app.use(async (ctx, next) => {
    await ctx.redis.set(key, value);
    const data = await ctx.redis.get(key);
});

config/default.json:

{
  "redis": {
    "port": 6379,
    "host": "127.0.0.1"
  }
}

debug:

DEBUG=koa2ioredis:* npm start

Modules:

Testing:

FAQs

Package last updated on 05 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts