amark / gun

An open source cybersecurity protocol for syncing decentralized graph data.
https://gun.eco/docs
Other
18.06k stars 1.16k forks source link

Put data from Node.js #1151

Closed deathg0d closed 2 years ago

deathg0d commented 2 years ago

Generally we have examples of client instance putting data, which is synced to the server. How do you put data from node.js itself?

import Gun from 'gun/gun';
import "gun/nts";
import "gun/lib/radix";
const peers = ['<A gundb relay server>'];
var gun = Gun({ peers });

data  =  <some data>
gun.get('mynode').put(data) <- this does nothing

gun.get('mynode').map().once((val, key)=>{
  console.log(key)
}) <-- prints nothing
jousi592 commented 2 years ago

Why was this closed? Did you find out why its happening?