@koex/redis
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

redis

NPM version Coverage Status Dependencies Build Status license issues

redis for koa extend, based on ioredis.

Install

$ npm install @koex/redis

Usage

// See more in test
import redis from '@koex/redis';

import * as Koa from 'koa';
const app = new Koa();

app.use(redis());
app.use(redis({
  port: 6379,          // Redis port
  host: '127.0.0.1',   // Redis host
  family: 4,           // 4 (IPv4) or 6 (IPv6)
  password: 'auth',
  db: 0
}));

app.use(ctx => {
  ctx.body = 'Hello, World!';
});

app.listen(8000, '0.0.0.0', () => {
  console.log('koa server start at port: 8000');
});

Related

Readme

Keywords

none

Package Sidebar

Install

npm i @koex/redis

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

5.29 kB

Total Files

5

Last publish

Collaborators

  • uniquecolesmith