I'm using Redis To Go in combination with the https://github.com/mranney/node_redis library. Redis gives me a url that looks like redis://me:978287c0b670694673d045f08b2e0371@icefish.redistogo.com:9393
but I don't know how to use it as createClient()
only takes the host and the port.
相关问题
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- google-drive can't get push notifications
- Getting Redis Master address from Sentinel C#
- How to reimport module with ES6 import
- Why is `node.js` dying when called from inside pyt
I believe that the scheme for the URL you have is:
redis://username:password@host:port
.I don't believe
username
is used.node_redis
provides two methods that you'll use to log in:createClient
andauth
. There are details in the readme, but for reference here is the relevant portion:I also had to add the parameter no_ready_check: true to the call to redis.createClient().