Skip to content

Commit

Permalink
Reduce code rundundance
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiahao Dai committed Oct 12, 2015
1 parent 668cb06 commit 4761c70
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions redis.js
Original file line number Diff line number Diff line change
@@ -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 });
};

0 comments on commit 4761c70

Please sign in to comment.