2.1.0 • Published 4 years ago

aredis v2.1.0

Weekly downloads
206
License
MIT
Repository
github
Last release
4 years ago

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

2.1.0

4 years ago

2.0.1

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

6 years ago

1.0.0

7 years ago