# parse-redis-url

> Parses Redis URL into a node_redis config object

Latest version **0.0.2** (published 2015-02-18) · BSD license · 0 weekly downloads

## Install

```sh
npm install parse-redis-url
pnpm add parse-redis-url
yarn add parse-redis-url
bun add parse-redis-url
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2015-02-18 |
| First published | 2013-04-22 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | George Miroshnykov |
| Maintainers | laggyluke |

## Links

- npm: https://www.npmjs.com/package/parse-redis-url
- Repository: https://github.com/laggyluke/node-parse-redis-url
- Issues: https://github.com/laggyluke/node-parse-redis-url/issues
- npm.io page: https://npm.io/package/parse-redis-url

## Recent versions

- 0.0.2 (latest) — 2015-02-18
- 0.0.1 — 2013-04-22

## README

parse-redis-url
===============

A module for parsing `redis://..` URLs into
[node_redis](https://github.com/mranney/node_redis)-friendly options.

Can also create actual client instance for your convenience.

[![Build Status](https://travis-ci.org/laggyluke/node-parse-redis-url.png?branch=master)](https://travis-ci.org/laggyluke/node-parse-redis-url)

Usage
-----

```javascript
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 }

```

---
_Source: https://npm.io/package/parse-redis-url · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
