mirror of
https://github.com/amark/gun.git
synced 2025-06-06 14:16:44 +00:00
add default path for gun
This commit is contained in:
parent
ab467589c2
commit
d46db34d45
@ -13,6 +13,7 @@ Gun.on('opt', function mount(at){
|
|||||||
var cat = (at.gun.back(-1)._);
|
var cat = (at.gun.back(-1)._);
|
||||||
|
|
||||||
opt.server = opt.server || at.opt.web;
|
opt.server = opt.server || at.opt.web;
|
||||||
|
opt.path = opt.path || at.opt.path || '/gun';
|
||||||
|
|
||||||
opt.web = new WebSocket.Server(opt);
|
opt.web = new WebSocket.Server(opt);
|
||||||
var peers = cat.opt.peers;
|
var peers = cat.opt.peers;
|
||||||
@ -116,4 +117,4 @@ function reconnect(peer, as){
|
|||||||
peer.defer = setTimeout(function(){
|
peer.defer = setTimeout(function(){
|
||||||
open(peer, as);
|
open(peer, as);
|
||||||
}, 2 * 1000);
|
}, 2 * 1000);
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ Gun.on('opt', function (at) {
|
|||||||
var gun = at.gun, opt = at.opt;
|
var gun = at.gun, opt = at.opt;
|
||||||
gun.__ = at.root._;
|
gun.__ = at.root._;
|
||||||
gun.__.opt.ws = opt.ws = gun.__.opt.ws || opt.ws || {};
|
gun.__.opt.ws = opt.ws = gun.__.opt.ws || opt.ws || {};
|
||||||
|
gun.__.opt.ws.path = gun.__.opt.ws.path || '/gun';
|
||||||
|
|
||||||
if(gun.__.opt.web){
|
if(gun.__.opt.web){
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user