Skip to content
Browse files

Adding the redis proxy bin file that works.

  • Loading branch information...
1 parent bf78112 commit 3102bf9468006937945ffc82aa14d5a53cdfa4a8 @sreeix committed May 5, 2012
Showing with 6 additions and 3 deletions.
  1. +3 −1 bin/redis-proxy
  2. +3 −2 server.js
View
4 bin/redis-proxy
@@ -1 +1,3 @@
-node server.js
+#!/usr/bin/env node
+
+require('../server.js');
View
5 server.js
@@ -4,7 +4,9 @@ var util = require('util');
var RedisProxy = require('./lib/redis_proxy');
var logger = require('winston');
-var config = JSON.parse(fs.readFileSync("config/config.json"));
+var configFile = process.argv[2] || "config/config.json";
+logger.info('using '+ configFile + ' as configuration source');
+var config = JSON.parse(fs.readFileSync(configFile));
var redis_proxy = new RedisProxy(config);
logger.level = config.debug ? 'debug' : 'info';
@@ -29,7 +31,6 @@ var server = net.createServer(function (socket) {
if(/quit/i.test(data)){
logger.debug('QUIT command received closing the connection' );
socket.end();
- // redis_proxy.quit(id);
}
});
});

0 comments on commit 3102bf9

Please sign in to comment.
Something went wrong with that request. Please try again.