Skip to content

Commit

Permalink
add default path for gun
Browse files Browse the repository at this point in the history
  • Loading branch information
zwhitchcox committed Mar 24, 2017
1 parent ab46758 commit d46db34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/uws.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -116,4 +117,4 @@ function reconnect(peer, as){
peer.defer = setTimeout(function(){
open(peer, as);
}, 2 * 1000);
}
}
1 change: 1 addition & 0 deletions lib/wsp/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(){
Expand Down

0 comments on commit d46db34

Please sign in to comment.