redis - Connecting to RedisToGo through Node.JS -
I am using Redis in conjunction with the library. Radis gives me a URL which looks like I believe that you have a URL scheme: I do not believe that Create a new customer connection. Default a redis: // me: 978287c0b670694673d045f08b2e0371@icefish.redistogo.com: 9393 but I do not know how to use it
createClient () Only takes hosts and ports.
Redis: // username: password @ host: port .
usernames is used
node_release provides two methods that you will use to log in:
createClient and
auth . There are details in this, but here is the relevant section for reference:
redis.createClient (port, host, option)
127.0.0.1 for
port default
6379 and
host . If you have
redis-server as the node on the same computer, the default for the port and host is probably fine. In the objects with the following potential properties,
options :
parser : which uses parsers using protocol protocols. If the default for hiredis is that the module is installed it can be set to
javascript .
return_buffers : If the default is set to the default
true , then return the bulk data answers as a node buffer object instead of the JavaScript string Will be done.
createClient () returns
client.auth (password, callback)
RedisClient < / Code> object named
client . When the Redis Server is connecting to the authentication that requires authentication, the
AUTH command should be sent as the first command after connecting. It can be difficult to coordinate with renections, ready checks, etc. to make it easy. This easy, reconnections in which
client.auth () stashes
passwords and will send after each connection.
callback is only applied once, the first was sent to the
AUTH command.
Comments
Post a Comment