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
0
votes
1 answer

Existing data in Peers is not getting synced

I tried setting up the gun.js server code in two machines and set up up 2 browser clients in each machine which contains code for registering both the machines as peers.The server code for both machines has put statements for 2 different…
0
votes
2 answers

What is the current `map()` doing?

( Gun.version 0.9.6 ) Given the following data structure { lights:{ 1:{ state:{ on:true, color:'red', br:254 } }, 2:{ state:{ …
0
votes
1 answer

Put callback is not called if null passed

gun 0.8.9 I wanted to "promisify" .put(cb) method and noticed that the callback cb was never triggered if null passed as data. It makes hard to control node selection. For example, if node properties were removed and I want to select only nodes…
srgbnd
  • 5,404
  • 9
  • 44
  • 80
0
votes
1 answer

How to delete a node from set?

How can I delete a node from set? For example, I want to delete velociraptor from dinos set. But when I run the script I still see two nodes behind dinos after dinos.map().val(cb) execution. const Gun = require('gun'); const gun = new Gun({…
srgbnd
  • 5,404
  • 9
  • 44
  • 80
0
votes
1 answer

gun.not() method does not work with nested nodes

How to make gun.not() to work with nested nodes? Do we have any other technique to init a nested node? The .not() method works if I deal with root level nodes. But in case of a nested node, I just get undefined when I want to get the node…
srgbnd
  • 5,404
  • 9
  • 44
  • 80
0
votes
1 answer

Nested object is not updated

Create a nested node var app = gun.get('app'); var node = app.get('watcher/1').put({"stats":{"num":3},"name":"trex"}); Listen to updates app.get('watcher/' + id).get('stats').on(function (v, k) { console.log('v:', v); console.log('k:',…
srgbnd
  • 5,404
  • 9
  • 44
  • 80
0
votes
1 answer

How to make gun accept a self-signed certificate?

gun 0.8.8, Node.js-to-Node.js, Node.js-to-browser I see the following error in browser console: VM103:161 WebSocket connection to 'wss://127.0.0.1:8080/gun' failed: Error in connection establishment: net::ERR_INSECURE_RESPONSE VM103:161 WebSocket…
srgbnd
  • 5,404
  • 9
  • 44
  • 80
0
votes
1 answer

Getting full path to an updated properties

Node.js to Node.js, no browser, gun 0.8.7 Is there a way to be notified about a full path to an updated property in gun? For, example, my listener gun.get('task/123').map().on(function (t) { console.log(t); }); fires the following update { _: …
srgbnd
  • 5,404
  • 9
  • 44
  • 80
0
votes
1 answer

How to run Gun server with Hapi?

I follow this tutorial to create Gun server. But I need to do it with Hapi. Now, I get the following error: > node server.js Hello wonderful person! :) Thanks for using GUN, feel free to ask for help on https://gitter.im/amark/gun and ask…
srgbnd
  • 5,404
  • 9
  • 44
  • 80
0
votes
1 answer

Unity C# - Reloading Script not working correctly

So this script should switch through magazines, not fill a magazine. What happens is with the first reload, even tho' the animation happens and everything. The magazine doesn't change until after you shoot and then reload. Reloading again will…
user4464658
-1
votes
1 answer

Check if a key is in gun.js

For example, before I put something in the database I want to check if that entry is already there. I try to do this: gun.get('demograph').once((data, key) => { console.log("realtime updates 1:", data); }); but I didn't get a response if…
Bogdan Bibina
  • 110
  • 3
  • 12
-1
votes
1 answer

why set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ldl") does not work?

when my application need link pthread library,i write set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -lpthread") in CmakeLists.txt and it works.but,when i need link dl lib, set ( CMAKE_C_FLAGS_C_FLAGS "${CMAKE_C_FLAGS} -ldl")does not work.if i use gcc…
liu
  • 181
  • 1
  • 10
-1
votes
1 answer

Handling connect/disconnect status & get online users in GUN

Is it possible to execute functions when server is connected/disconnected? Principally to give user information about connection status.
Ivan Kalashnik
  • 411
  • 7
  • 12
-2
votes
1 answer

How to reference a script from another script to access multiple variables in unity c#

Hello I have 2 script my recoil script and my gunystem script I have my recoil script on my camera recoil obj as a child of camera rot obj I have my gunsystem script on multiple guns i am trying to make all guns have different recoil how do i do…
-2
votes
2 answers

Pygame Bullet Hell Game

I was wondering about bullets/guns in my bullet hell type game. In this game, there will be a shop that you can collect coins for and buy different types of guns and upgrades. I was wondering if I should create a class for each of these guns, or…
1 2 3
9
10