Permalink
Browse files

redis to go setting

  • Loading branch information...
hakobe committed Dec 30, 2013
1 parent 685806f commit 8ca7a4e7bb1acbfc5264b6ccf840c2dbdd185e7f
Showing with 9 additions and 2 deletions.
  1. +9 −2 lib/panelManager.js
View
@@ -3,12 +3,19 @@ var events = require('events');
var fs = require('fs');
var config = require('./config');
var path = require('path');
var url = require('url');
var _ = require('underscore');
var redis = require("redis");
redis.debug_mode = true;
var redisClient = redis.createClient();
var redisClient;
if (process.env.REDISTOGO_URL) {
rtg = url.parse(process.env.REDISTOGO_URL);
redisClient = require("redis").createClient(rtg.port, rtg.hostname);
redisClient.auth(rtg.auth.split(":")[1]);
} else {
redisClient = require("redis").createClient();
}
redisClient.on('error', function(err) {
console.error('redis error: ' + err);

0 comments on commit 8ca7a4e

Please sign in to comment.