🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

parse-redis-url

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-redis-url

Parses Redis URL into a node_redis config object

0.0.2
latest
Source
npm
Version published
Weekly downloads
4.7K
-24.13%
Maintainers
1
Weekly downloads
 
Created
Source

parse-redis-url

A module for parsing redis://.. URLs into node_redis-friendly options.

Can also create actual client instance for your convenience.

Build Status

Usage

var redis = require('redis');
var parseRedisUrl = require('parse-redis-url')(redis);
var url = 'redis://dummy:password@example.com:5555/42';

// create a new client from URL

parseRedisUrl.createClient(url, function(err, client) {
   if (err) return callback(err);
   // do something with client
});



// simply parse URL for connection options
// please note that username is not used by Redis,
// so it's not included in the result

var options = parseRedisUrl.parse(url);
// { host: 'example.com',
//  port: 5555,
//  password: 'password',
//  database: 42 }

FAQs

Package last updated on 18 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts