From bda6edef542da99e4f6e5da0576d75b16c6e99d1 Mon Sep 17 00:00:00 2001 From: Brian Hammond Date: Tue, 6 Apr 2010 10:58:51 -0400 Subject: [PATCH] Fixes for Kiwi --- README.md | 20 +++++++++++++++++++- examples/using-kiwi.js | 16 ++++++++++++++++ seed.yml | 4 ++-- 3 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 examples/using-kiwi.js diff --git a/README.md b/README.md index 307fffc..a5b85b7 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,26 @@ Recent changes completely break backwards compatibility. Sorry, it was time. ## Synopsis +When working from a git clone: + + var client = require("./lib/redis-client").createClient(); var sys = require("sys"); - var client = require("redisclient").createClient(); + client.stream.addListener("connect", function () { + client.info(function (err, info) { + if (err) throw new Error(err); + sys.puts("Redis Version is: " + info.redis_version); + client.close(); + }); + }); + +When working with a Kiwi-based installation: + + // $ kiwi install redis-client + + var sys = require("sys"), + kiwi = require("kiwi"), + client = kiwi.require("redis-client").createClient(); + client.stream.addListener("connect", function () { client.info(function (err, info) { if (err) throw new Error(err); diff --git a/examples/using-kiwi.js b/examples/using-kiwi.js new file mode 100644 index 0000000..075e760 --- /dev/null +++ b/examples/using-kiwi.js @@ -0,0 +1,16 @@ +// Kiwi is a package manager for Node.js +// http://wiki.github.com/visionmedia/kiwi/getting-started +// +// $ kiwi install redis-client + +var sys = require("sys"), + kiwi = require("kiwi"), + client = kiwi.require("redis-client").createClient(); + +client.stream.addListener("connect", function () { + client.info(function (err, info) { + if (err) throw new Error(err); + sys.puts("Redis Version is: " + info.redis_version); + client.close(); + }); +}); diff --git a/seed.yml b/seed.yml index 9d25e93..2ea2308 100644 --- a/seed.yml +++ b/seed.yml @@ -1,6 +1,6 @@ --- - name: redis-node-client + name: redis-client description: A Redis client tags: redis - version: 0.1.1 + version: 0.2.0