Questions tagged [gun]

GUN (a.k.a GUNdb, GUNjs) is a real-time, distributed, offline-first, graph database engine.

GUN (Graph. Universe. Node.) is a JavaScript database that is like an Open Source Firebase. If you need help or if you are stuck on a bug, problem, or are confused - just give us a shout by posting your question.

Project site: gundb.io
Source code at: github.com/amark/gun
Chat room: gitter.im/amark/gun

150 questions
2
votes
1 answer

Subscription based nosql in-memory database

I need subscription based in-memory database where I can have callbacks on my data change (I'll use it for my tests only). I used gunDB, and it works only this way: var Gun = require('gun'); var key = 'something_long'; var state = { a: 1, b: 2…
Roman Pushkin
  • 5,639
  • 3
  • 40
  • 58
2
votes
2 answers

Getting streaming data from gun

on() is supposed to stream data from a path or key 1. But when I put data on my path, I'm not seeing the updated stream. var myData = Gun('https://gunjs.herokuapp.com/gun') …
MetaSean
  • 881
  • 17
  • 25
1
vote
1 answer

What is the key scheme and encoding used in GUN?

What are the key schemes, sizes, and encodings used in GUN db? I didn't find a quick answer on searching so am adding the question here. The keys look like: let lee = await…
Lee
  • 29,398
  • 28
  • 117
  • 170
1
vote
2 answers

GUN.js causes build warning: Critical dependency: the request of a dependency is an expression

I have GUN.js on my app, and it's causing this troublesome warning. How do I clear up this warning? WARNING in ./node_modules/gun/gun.js 6:17-29 Critical dependency: the request of a dependency is an expression @ ./src/components/MessageHandler.js…
Andres Holguin
  • 173
  • 1
  • 6
1
vote
0 answers

Building a tree structure with Gun

I am trying to implement, through Gun, a tree structure that allows to express relationships between companies, subsidiaries of these companies and their products. The structure that I have done is as follows: there is a root node: this is the main…
elmazzun
  • 1,066
  • 2
  • 18
  • 44
1
vote
1 answer

Two different forms in gun.js

been coding for a few months and new to gun.js , been playing around with the todo example for days and cant seem to figure out how to create two seperate forms which don't sync the todos and put them in each others list. Below is code which doesn't…
viritijk
  • 33
  • 1
  • 4
1
vote
1 answer

Passing ID of websocket connection between testcases (Common Test) , Erlang

Who can help me? I have server that based on websockets. I want to test API using common tests (CT) passing connection ID between testcases and using only one connection for all testcases. Test cases closes the connection. Please, give me example if…
1
vote
1 answer

trying to understand Gundb (nodejs application) for my study

For my study I'm trying to use Gun to store the date for my app. I thought it would be useful to first use one location to host my data, get it up and running and then introduce the peer connectivity. Now my first question would be: is this way of…
A-Daneel
  • 35
  • 5
1
vote
1 answer

connect peers in gun db

I need to understand how to connect peers in gun db. I have a socket.io server deployed on heroku but I don't know if it will work with gun. Can anyone with experience with gun db help me with this? I've readed the documentations but it's not clear…
jihuuNI
  • 551
  • 2
  • 5
  • 17
1
vote
1 answer

Is there a way I can use a node js library in php?

Is there a way I can use a Node JS library in php? I’m thinking of the gun library in particular https://gun.eco/
desbest
  • 4,746
  • 11
  • 51
  • 84
1
vote
1 answer

Accessing previous values in the chain of gundb gets

In gundb it is convenient to chain get to find a node. For example: grandparent.get("children").map().get("children").map().once(function(grandchild,id) {...}) However the function gets called with the context of grandchild. What if I want to get a…
Leo
  • 56
  • 4
1
vote
1 answer

Updating sync changes in client

I've got Gun synchronizing across a couple of clients. On one I'm subscribing to the data using map().on(). On the other I delete an item using map().unset(). My question, when I delete an item the changes pops up on the other client as null - I…
Peter
  • 25
  • 2
1
vote
1 answer

how to use gun:open in a gen_server module

I have a gen_server module, I use gun as http client to make a long pull connection with a http server, so I call gun:open in my module's init, but if gun:open fail, my module fail, so my application fail to start. What is the proper way to do…
Jas6033
  • 105
  • 1
  • 11
1
vote
1 answer

How to subscribe to changes in the whole gun graph?

I wonder if there is a way to observe changes in the whole graph, instead of subscribing to changes on one particular node. I was not able to find an answer reading the Docs/Howtos at gun.eco/docs Lets say you build a real-time mind-mapping…
Dletta
  • 66
  • 4
1
vote
1 answer

How to get map without subscribe functionality?

I would like to retrieve all items from a set. e.g. get("mylist").map().once()) But I don't want the inherent subscribe functionality of map i.e. I don't want to be notified when a new item is added to the list. Is there a way to do this?
Peter
  • 25
  • 2