diff --git a/lib/uws.js b/lib/uws.js index 984fd3fc..d574ca1a 100644 --- a/lib/uws.js +++ b/lib/uws.js @@ -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; @@ -116,4 +117,4 @@ function reconnect(peer, as){ peer.defer = setTimeout(function(){ open(peer, as); }, 2 * 1000); -} \ No newline at end of file +} diff --git a/lib/wsp/server.js b/lib/wsp/server.js index 15740c80..6ef38671 100644 --- a/lib/wsp/server.js +++ b/lib/wsp/server.js @@ -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(){