mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
woohoo
This commit is contained in:
parent
3a8714b27c
commit
e90ace2c4c
2
shots.js
2
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';
|
||||
|
@ -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){
|
||||
|
Loading…
x
Reference in New Issue
Block a user