apemanredis

1.0.9 • Public • Published

apemanredis

Build Status Code Climate Code Coverage npm Version JS Standard

Redis client

Installation

$ npm install apemanredis --save

Usage

'use strict'
 
const apemanredis = require('apemanredis')
const co = require('co')
 
let redis = apemanredis({
  host: '127.0.0.1',
  db: 1 // db number of redis
})
 
co(function * () {
  // Set and get string
  {
    yield redis.set('foo', 'bar')
    let foo = yield redis.get('foo')
    console.log(foo) // -> 'bar'
  }
 
  // Set and get hash
  {
    yield apemanredis.hset('baz', 'quz', 'quzz')
    let baz = yield apemanredis.hgetall('baz')
    console.log(baz) // -> {quz: 'quzz'}
  }
})
 

License

This software is released under the MIT License.

Links

Readme

Keywords

Package Sidebar

Install

npm i apemanredis

Weekly Downloads

3

Version

1.0.9

License

MIT

Last publish

Collaborators

  • okunishinishi