server.js 752 B

1234567891011121314151617181920212223
  1. ;(function(){
  2. var Gun = require('../gun'), u;
  3. Gun.serve = require('./serve');
  4. //process.env.GUN_ENV = process.env.GUN_ENV || 'debug';
  5. //console.LOG = {}; // only do this for dev.
  6. Gun.on('opt', function(root){
  7. if(u === root.opt.super){ root.opt.super = true }
  8. if(u === root.opt.faith){ root.opt.faith = true } // HNPERF: This should probably be off, but we're testing performance improvements, please audit.
  9. root.opt.log = root.opt.log || Gun.log;
  10. this.to.next(root);
  11. })
  12. require('../nts');
  13. require('./store');
  14. require('./rs3');
  15. require('./wire');
  16. try{require('../sea');}catch(e){}
  17. try{require('../axe');}catch(e){}
  18. //require('./file');
  19. require('./evict');
  20. require('./multicast');
  21. require('./stats');
  22. module.exports = Gun;
  23. }());