Skip to content

Instantly share code, notes, and snippets.

@hynra
Created November 11, 2019 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hynra/5f2442c2a7d499979ea1908fff674ea0 to your computer and use it in GitHub Desktop.
Save hynra/5f2442c2a7d499979ea1908fff674ea0 to your computer and use it in GitHub Desktop.
const Redis = require("ioredis");
const client = (Config.isSentinel === 'true') ? new Redis({
sentinels: Config.sentinels,
name: "mymaster"
}) : new Redis({
host: Config.redis.host,
port: Config.redis.port,
password: Config.redis.password
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment