aredis

2.1.0 • Public • Published

aredis

Build Status npm Version JS Standard

Redis wrapper

Installation

$ npm install aredis --save

Usage

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

License

This software is released under the MIT License.

Links

Readme

Keywords

none

Package Sidebar

Install

npm i aredis

Weekly Downloads

3

Version

2.1.0

License

MIT

Unpacked Size

18.1 kB

Total Files

26

Last publish

Collaborators

  • okunishinishi