From dc461f08d4571fb076f8b577270539236ddafffc Mon Sep 17 00:00:00 2001 From: Kyle Date: Thu, 16 Jul 2015 11:01:29 -0500 Subject: [PATCH 1/3] clarifies createClient in README as per #781 --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a7dbb80e28..9a97aaf65d 100644 --- a/README.md +++ b/README.md @@ -144,15 +144,17 @@ resume sending when you get `drain`. `client` will emit `idle` when there are no outstanding commands that are awaiting a response. ## redis.createClient() +If you have `redis-server` running on the same computer as node, then the defaults for +port and host are probably fine and you don't need to supply any arguments. `createClient()` returns a `RedisClient`. ### overloading -* redis.createClient() = redis.createClient(6379, '127.0.0.1', {}) -* redis.createClient(options) = redis.createClient(6379, '127.0.0.1', options) -* redis.createClient(unix_socket, options) -* redis.createClient(port, host, options) +* `redis.createClient(port,host,options)` +* `redis.createClient()` is equivalent to `redis.createClient(6379, '127.0.0.1', {})` +* `redis.createClient(options)` is equivalent to `redis.createClient(6379, '127.0.0.1', options)` +* `redis.createClient(unix_socket, options)` +* `redis.createClient(port, host, options)` -If you have `redis-server` running on the same computer as node, then the defaults for -port and host are probably fine. `options` in an object with the following possible properties: + `options` in an object with the following possible properties: * `parser`: which Redis protocol reply parser to use. Defaults to `hiredis` if that module is installed. This may also be set to `javascript`. @@ -205,7 +207,6 @@ You can force an IPv6 if you set the family to 'IPv6'. See nodejs net or dns mod client.end(); ``` -`createClient()` returns a `RedisClient` object that is named `client` in all of the examples here. ## client.auth(password, callback) From bc48c2b069552d9de9f8d02e1a353f81ba23a42f Mon Sep 17 00:00:00 2001 From: Kyle Date: Thu, 16 Jul 2015 11:02:25 -0500 Subject: [PATCH 2/3] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a97aaf65d..836bf9d1fa 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ resume sending when you get `drain`. ## redis.createClient() If you have `redis-server` running on the same computer as node, then the defaults for -port and host are probably fine and you don't need to supply any arguments. `createClient()` returns a `RedisClient`. +port and host are probably fine and you don't need to supply any arguments. `createClient()` returns a `RedisClient` object. ### overloading * `redis.createClient(port,host,options)` From defec9c1e1a97dbe0531c17b22fd00afd3e27021 Mon Sep 17 00:00:00 2001 From: Kyle Date: Thu, 16 Jul 2015 11:30:32 -0500 Subject: [PATCH 3/3] fixed duplicate and typo --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 836bf9d1fa..c9900bbbef 100644 --- a/README.md +++ b/README.md @@ -152,9 +152,8 @@ port and host are probably fine and you don't need to supply any arguments. `cre * `redis.createClient()` is equivalent to `redis.createClient(6379, '127.0.0.1', {})` * `redis.createClient(options)` is equivalent to `redis.createClient(6379, '127.0.0.1', options)` * `redis.createClient(unix_socket, options)` -* `redis.createClient(port, host, options)` - `options` in an object with the following possible properties: + `options` is an object with the following possible properties: * `parser`: which Redis protocol reply parser to use. Defaults to `hiredis` if that module is installed. This may also be set to `javascript`.