gun/test/old/server.js
2014-09-09 02:05:13 -06:00

22 lines
534 B
JavaScript

module.exports=require('theory')
({name: 'echo'
, state: {way:'state', flow:-1}
, invincible: true
, dep: ['../shots']
, init: function(a){
var echo = {}, redis, client;
echo.shot = a.shots();
echo.put = function(m){
console.log('stream', m);
}
echo.state = function(m){
if(echo.shot.server(m,a.com.reply)){ return }
m.what.body = 'module.exports = {boo: "yay"};';
m.what.type = 'js';
a.com.reply(m);
};
/*echo.shot.stream.on(function(m){
console.log('stream on!', m);
});*/
return echo;
}});