1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00

show off redis:// format overloading

This commit is contained in:
Benjamin Coe
2015-09-03 23:56:17 -07:00
parent bd5cc64652
commit 837ea10a0c

View File

@@ -155,10 +155,11 @@ If you have `redis-server` running on the same computer as node, then the defaul
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)`
* `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('redis://user:pass@host:port', options)`
`options` is an object with the following possible properties: