redis-connection-object-generator

0.2.1 • Public • Published

Installation

Using npm:

npm install --save redis-connection-object-generator

Using

const redisConnectionObjectGenerator = require('redis-connection-object-generator')

redisConnectionObjectGenerator('redis://:@127.0.0.1:6379/0')
// { host: '127.0.0.1', port: 6379, family: 0, password: '', db: 0 }

redisConnectionObjectGenerator(`sentinel://:password@127.0.0.1:6380,127.0.0.1:6379,127.0.0.1:6378/service_name:mymaster`)
/*
{ name: 'mymaster',
  sentinels:
   [ { host: '127.0.0.1', port: 6380 },
     { host: '127.0.0.1', port: 6379 },
     { host: '127.0.0.1', port: 6378 } ],
  password: 'password' }
*/

Readme

Keywords

none

Package Sidebar

Install

npm i redis-connection-object-generator

Weekly Downloads

0

Version

0.2.1

License

ISC

Unpacked Size

4.56 kB

Total Files

4

Last publish

Collaborators

  • mnalon