redis-factory

1.0.0 • Public • Published

redis-factory

A factory for creating a redis client from a connection string.

Installation (via npm)

$ npm install redis-factory

Why?

The de facto node.js redis library library doesn't support creating a client using a redis://username:password@host:port/-style connection string. This adds that support without hardcoding the version of the redis library you are using, so you an opt into using alternatives such as romis.

Usage

(function () {
  'use strict';
 
  var redis = require('redis'),
    redisFactory = require('redis-factory'),
    connectionString = process.env.REDIS_URI || 'redis://localhost';
 
  module.exports = redisFactory(redis)(connectionString);
 
}());

License

MIT License

Author

Lanetix (engineering@lanetix.com)

/redis-factory/

    Package Sidebar

    Install

    npm i redis-factory

    Weekly Downloads

    1

    Version

    1.0.0

    License

    none

    Last publish

    Collaborators

    • rahulbharadwaj
    • jasif-wm
    • shyam.mohan
    • qbibrahim
    • sidharth.n
    • hariqb
    • arjuncprasannan
    • renjith_ram_qburst
    • anasqburst
    • jyothis-qb
    • qburst-pratyush
    • cdrohithmqb
    • sudheeshqburst
    • davoodul
    • mable-liza-mathew
    • sowmyab
    • anoop-kuttikkattu
    • munisa
    • dheerajds
    • arjunqb
    • ashishqburst
    • lanetix-system
    • manu-kodiyan-winmore
    • dnm-winmore
    • mkdyanugk
    • vigneshk7
    • soumyaarun
    • aswanth
    • sajith.qb
    • dhiluraj-qburst
    • anandqb
    • arun-dtk
    • vikasqb
    • acpradosh1234