ba74d1db by Glitch (hello-express)

:turkey::bouquet: Checkpoint

./server.js:13690106/702
1 parent 18829464
{"j":{"ack\u001bname":{"":{":":"Jack",">":1587032994032}},"ill\u001bname":{"":{":":"Jill",">":1587032608228.001}}}}
\ No newline at end of file
{"j":{"ack\u001bname":{"":{":":"Jack",">":1587037784462}},"ill\u001bname":{"":{":":"Jill",">":1587037784464.001}}},"zero":{"1\u001bname":{"":{":":"Jack",">":1587038341751}},"2\u001bname":{"":{":":"Jill",">":1587038341752.001}}}}
\ No newline at end of file
......
......@@ -25,7 +25,15 @@ server.on('upgrade', async function (request, socket, head) {
console.log('Create id',pathname);
// NOTE: Only works with lib/ws.js shim allowing a predefined WS as ws.web parameter in Gun constructor
gun.server = new WebSocket.Server({ noServer: true, path: pathname});
gun.gun = new Gun({peers:[], localStorage: false, file: false, ws: { noServer: true, path: pathname, web: gun.server }, web: gun.server });
console.log('set peer',request.headers.host+pathname);
gun.gun = new Gun({
peers:[], // should we use self as peer?
localStorage: false,
file: false,
ws: { noServer: true, path: pathname, web: gun.server },
web: gun.server
});
gun.gun.on("in", function(msg) { console.log('got',msg) });
lru.set(pathname,gun);
}
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!