Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated README

  • Loading branch information...
commit f00f860c10fef5392d41cb89800b3e84fe8eab12 1 parent d55a433
@chriso authored
Showing with 19 additions and 21 deletions.
  1. +19 −21 README.md
View
40 README.md
@@ -2,35 +2,38 @@
Follow [redbackjs.com](http://redbackjs.com/) and [@chris6F](twitter.com/chris6F) for updates.
-### What is it?
+## Installation
-Redback is a high-level library for Redis. It provides an accessible and extensible interface to the Redis [data types](http://redis.io/topics/data-types) and allows you to roll your own structures with ease. Redback comes with the following built-in structures:
+ npm install -g redback
-- List
-- Set
-- SortedSet
-- Hash
-- Channel
-- Cache
+## What is it?
-There's also some more advanced structures available:
+Redback is a high-level library for Redis. It provides an accessible and extensible interface to the Redis [data types](http://redis.io/topics/data-types) and allows you to roll your own structures with ease. Redback comes with the following built-in structures:
+- **List**
+- **Set**
+- **SortedSet**
+- **Hash**
+- **Channel**
+- **Cache**
- *DensitySet*
- *KeyPair*
- *SocialGraph*
- *CappedList*
-### Usage
+## Usage
var redback = require('redback').createClient();
- //Call: redback.create<structure>(key); where <structure> is any of the structures listed above
+ //redback.create<Structure>(key)
- var list = redback.createList('my_list');
+ var user = redback.createHash('user1');
+ user.set({username:'chris', password:'redisisawesome'}, callback);
- list.push(['foo','bar'], callback);
+ var log = redback.createCappedList('log', 1000);
+ log.push('Log message ...');
-### Creating your own structures
+## Creating your own structures
To create your own structure, use `addStructure(name, methods)`.
Structures have access to a Redis key `this.key` and the Redis client
@@ -59,7 +62,7 @@ To use the queue, call `createQueue(key, is_fifo)`
queue.add('awesome!', callback);
-### Other uses
+## Other uses
You can also use Redis as a cache backend or as a pub/sub provider
@@ -82,13 +85,8 @@ You can also use Redis as a cache backend or as a pub/sub provider
//To send messages
channel.publish(msg);
-### Installation
-
- npm install -g redback
-
-If you don't have Node.JS or NPM, see [this page](https://github.com/chriso/redback/wiki/Node.JS-and-NPM).
-### License
+## License
(MIT License)
Please sign in to comment.
Something went wrong with that request. Please try again.