Nikolay Suslov 4 vuotta sitten
vanhempi
commit
4a1735edcc
1 muutettua tiedostoa jossa 4 lisäystä ja 3 poistoa
  1. 4 3
      index.js

+ 4 - 3
index.js

@@ -27,11 +27,12 @@ global.gun = Gun({ web: config.server.listen(config.port), axe: false}); //until
 console.log('Relay peer started on port ' + config.port + ' with /gun');
 
 let tickMsg = {
-    parameters: [],
-    time: 'tick'//hb
+    parameters: "[]",
+    time: 'tick',//hb
+    sender: 'server'
 };
 
-global.gun.get('server').get('heartbeat').get('tick').put(JSON.stringify(tickMsg));
+global.gun.get('server').get('heartbeat').get('tick').put(tickMsg);
 
 //instance.get('heartbeat').put({ tick: "{}" }).heartbeat(0.0, 1);