mirror of
https://github.com/amark/gun.git
synced 2025-07-08 13:52:32 +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
|
redis = a.redis
|
||||||
, client = redis.createClient();
|
, client = redis.createClient();
|
||||||
client.on('error', function(e){
|
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(!(/ECONNREFUSED/).test(e)){ return }
|
||||||
if(redis.none){ return }
|
if(redis.none){ return }
|
||||||
redis.path = path || '/usr/local/bin/redis-server';
|
redis.path = path || '/usr/local/bin/redis-server';
|
||||||
|
@ -5,11 +5,18 @@ module.exports=require('theory')
|
|||||||
, dep: ['../shots']
|
, dep: ['../shots']
|
||||||
, init: function(a){
|
, init: function(a){
|
||||||
console.log("ECHO");
|
console.log("ECHO");
|
||||||
var echo = {};
|
var echo = {}, redis, client;
|
||||||
echo.put = function(m){
|
echo.put = function(m){
|
||||||
console.log('stream', m);
|
console.log('stream', m);
|
||||||
}
|
}
|
||||||
echo.state = function(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);
|
var w = echo.get(m);
|
||||||
console.log('state', w);
|
console.log('state', w);
|
||||||
if(w){
|
if(w){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user