1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00

chore: refactor parts out of the index.js file

This commit is contained in:
Ruben Bridgewater
2017-05-26 18:45:52 +02:00
parent a3a74559da
commit 3065e2e7be
19 changed files with 271 additions and 281 deletions

View File

@@ -28,7 +28,7 @@ module.exports = function createClient (portArg, hostArg, options) {
options.password = parsed.auth.split(':')[1]
}
if (parsed.protocol && parsed.protocol !== 'redis:') {
console.warn(`nodeRedis: WARNING: You passed "${parsed.protocol.substring(0, parsed.protocol.length - 1) }" as protocol instead of the "redis" protocol!`)
console.warn(`nodeRedis: WARNING: You passed "${parsed.protocol.substring(0, parsed.protocol.length - 1)}" as protocol instead of the "redis" protocol!`)
}
if (parsed.pathname && parsed.pathname !== '/') {
options.db = parsed.pathname.substr(1)