From 4761c70f3c8ec68636086ab5307864bcf982de3a Mon Sep 17 00:00:00 2001 From: Jiahao Dai <20123225@student.shiep.edu.cn> Date: Mon, 12 Oct 2015 18:19:26 +0800 Subject: [PATCH] Reduce code rundundance --- redis.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/redis.js b/redis.js index e89fb14..e170495 100644 --- a/redis.js +++ b/redis.js @@ -1,10 +1,8 @@ - var redis = require('redis'); var uri = process.env.WEPLAY_REDIS_URI || 'localhost:6379'; var auth_password = process.env.WEPLAY_REDIS_AUTH || ''; var pieces = uri.split(':'); module.exports = function(){ - var client = redis.createClient(pieces[1], pieces[0], { return_buffers: true, no_ready_check: true, auth_pass: auth_password }); - return client; + return redis.createClient(pieces[1], pieces[0], { return_buffers: true, no_ready_check: true, auth_pass: auth_password }); };