add default path for gun

This commit is contained in:
Zane Hitchcox 2017-03-24 12:56:11 -04:00
parent ab467589c2
commit d46db34d45
2 changed files with 3 additions and 1 deletions

View File

@ -13,6 +13,7 @@ Gun.on('opt', function mount(at){
var cat = (at.gun.back(-1)._);
opt.server = opt.server || at.opt.web;
opt.path = opt.path || at.opt.path || '/gun';
opt.web = new WebSocket.Server(opt);
var peers = cat.opt.peers;

View File

@ -15,6 +15,7 @@ Gun.on('opt', function (at) {
var gun = at.gun, opt = at.opt;
gun.__ = at.root._;
gun.__.opt.ws = opt.ws = gun.__.opt.ws || opt.ws || {};
gun.__.opt.ws.path = gun.__.opt.ws.path || '/gun';
if(gun.__.opt.web){
setTimeout(function(){