Socket
Socket
Sign inDemoInstall

parse-redis-url

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    parse-redis-url

Parses Redis URL into a node_redis config object


Version published
Weekly downloads
8.4K
decreased by-7.65%
Maintainers
1
Install size
8.23 kB
Created
Weekly downloads
 

Readme

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

Last updated on 18 Feb 2015

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc