From e90ace2c4c08ed2db160a5ad07fca70eb657935e Mon Sep 17 00:00:00 2001 From: theory Date: Mon, 17 Mar 2014 05:57:07 -0600 Subject: [PATCH] woohoo --- shots.js | 2 -- test/server.js | 9 ++++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/shots.js b/shots.js index b8d5d9c7..c517ebe6 100644 --- a/shots.js +++ b/shots.js @@ -7,8 +7,6 @@ module.exports = require('theory') redis = a.redis , client = redis.createClient(); client.on('error', function(e){ - client.set("string key", "string val", redis.print); - client.get("string key", redis.print); if(!(/ECONNREFUSED/).test(e)){ return } if(redis.none){ return } redis.path = path || '/usr/local/bin/redis-server'; diff --git a/test/server.js b/test/server.js index bb0d5f0a..ed2d028d 100644 --- a/test/server.js +++ b/test/server.js @@ -5,11 +5,18 @@ module.exports=require('theory') , dep: ['../shots'] , init: function(a){ console.log("ECHO"); - var echo = {}; + var echo = {}, redis, client; echo.put = function(m){ console.log('stream', m); } echo.state = function(m){ + redis = redis || require('redis') + , client = client || redis.createClient(); + client.set("string key", "string val", redis.print); + client.get("string key", function(e,r){ + console.log("WE DID IT!!!!"); + console.log(e, r); + }); var w = echo.get(m); console.log('state', w); if(w){