make debug available

This commit is contained in:
Mark Nadal 2018-05-15 22:56:59 -07:00
parent 2015a01b65
commit 30ae1e7392

View File

@ -18,13 +18,14 @@
print += db.nodes + ' nodes. ';
}
if(db.count){ print += db.count + ' msgs. '}
console.log(print);
console.log(db.print = print);
}, 2500);
var Gun = require('../gun');
Gun.on('opt', function(root){
this.to.next(root);
if(root.once){ return }
root.debug = db;
db.root = root;
db.peers = root.opt.peers;