@@ -175,10 +175,15 @@ resume sending when you get `drain`.
175
175
176
176
` client ` will emit ` idle ` when there are no outstanding commands that are awaiting a response.
177
177
178
- ## redis.createClient(port, host, options )
178
+ ## redis.createClient()
179
179
180
- Create a new client connection. ` port ` defaults to ` 6379 ` and ` host ` defaults
181
- to ` 127.0.0.1 ` . If you have ` redis-server ` running on the same computer as node, then the defaults for
180
+ ### overloading
181
+ * redis.createClient() = redis.createClient(6379, '127.0.0.1', {})
182
+ * redis.createClient(options) = redis.createClient(6379, '127.0.0.1', options)
183
+ * redis.createClient(unix_socket, options)
184
+ * redis.createClient(port, host, options)
185
+
186
+ If you have ` redis-server ` running on the same computer as node, then the defaults for
182
187
port and host are probably fine. ` options ` in an object with the following possible properties:
183
188
184
189
* ` parser ` : which Redis protocol reply parser to use. Defaults to ` hiredis ` if that module is installed.
@@ -234,24 +239,6 @@ You can force an IPv6 if you set the family to 'IPv6'. See nodejs net or dns mod
234
239
235
240
` createClient() ` returns a ` RedisClient ` object that is named ` client ` in all of the examples here.
236
241
237
- ### Unix Domain Socket
238
-
239
- You can also create a connection to Redis server via the unix domain socket if the server
240
- has it enabled:
241
-
242
- ``` js
243
- var redis = require (" redis" );
244
- var client = redis .createClient (" /tmp/redis.sock" );
245
- ```
246
-
247
- Sample ` redis.conf ` configuration to enable unix domain socket listening:
248
-
249
- ``` conf
250
- unixsocket /tmp/redis.sock
251
- unixsocketperm 755
252
- ```
253
-
254
- See [ issue #204 ] ( https://github.com/mranney/node_redis/issues/204 ) for more information.
255
242
256
243
## client.auth(password, callback)
257
244
0 commit comments