catbox-redis
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -47,3 +47,6 @@ | ||
if (this.settings.socket) { | ||
if (this.settings.url) { | ||
client = Redis.createClient(this.settings.url, options); | ||
} | ||
else if (this.settings.socket) { | ||
client = Redis.createClient(this.settings.socket, options); | ||
@@ -50,0 +53,0 @@ } |
{ | ||
"name": "catbox-redis", | ||
"description": "Redis adapter for catbox", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"author": "Eran Hammer <eran@hammer.io> (http://hueniverse.com)", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -10,2 +10,3 @@ catbox-redis [![Build Status](https://travis-ci.org/hapijs/catbox-redis.svg?branch=master)](https://travis-ci.org/hapijs/catbox-redis) | ||
- `url` - the Redis server URL (if `url` is provided, `host`, `port`, and `socket` are ignored) | ||
- `host` - the Redis server hostname. Defaults to `'127.0.0.1'`. | ||
@@ -12,0 +13,0 @@ - `port` - the Redis server port or unix domain socket path. Defaults to `6379`. |
@@ -518,2 +518,19 @@ | ||
it('connects via a Redis URL when one is provided.', (done) => { | ||
const options = { | ||
url: 'redis://127.0.0.1:6379' | ||
}; | ||
const redis = new Redis(options); | ||
redis.start((err) => { | ||
expect(err).to.not.exist(); | ||
const client = redis.client; | ||
expect(client).to.exist(); | ||
done(); | ||
}); | ||
}); | ||
it('does not stops the client on error post connection', (done) => { | ||
@@ -520,0 +537,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34669
888
31