@tanshenghu/node-redis

1.0.0 • Public • Published

@tanshenghu/node-redis

Installation

npm install @tanshenghu/node-redis --save-dev

or

yarn add @tanshenghu/node-redis --dev

nodejs DEMO

import http from 'http';
import Nredis from '@tanshenghu/node-redis';

const middleware = Nredis();
http.createServer(function(request, response){

  middleware({
    context: request,
    next: Promise.resolve
  });

  ...
  ...
  ...

  request.setItem('userName', '张三丰');

  response.end('');


})
.listen(8080);

koa DEMO

import Koa from 'koa';
import Nredis from '@tanshenghu/node-redis';

const koa = new Koa();

...
...
...
koa.use(Nredis());
...
...
...

koa.listen('8080');

Readme

Keywords

Package Sidebar

Install

npm i @tanshenghu/node-redis

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

2.7 kB

Total Files

3

Last publish

Collaborators

  • tanshenghu