2.0.0 • Published 8 years ago

redisng v2.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

RedisNG

RedisNG is an extremely lightweight yet full featured Redis client for Node.js

Installation

npm install --save redisng

Usage

import Redis from 'redisng'

const redis = new Redis()
redis.connect().then(function() {
  return redis.set('KEY', 'VALUE').then(function() {
    return redis.get('KEY')
  }).then(function(result) {
    console.log(result)
    redis.close()
  })
}, function(e) {
  console.log(e.message, e.stack)
})

API

class Redis extends EventEmitter{
  connect(host, port): Promise
  ref(): void
  unref(): void
  close(): void

  get(key): Promise<string>
  set(key, value): Promise<string>
  ... other redis commands ...
}

License

This project is licensed under the terms of MIT license. See the License file for more info.

2.0.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago