amark on master
argh, axe needed skip reset. + … is this good enough? it's alive!!!! and 3 more (compare)
@Lexi:matrix.org JS
set
not compatible :(
@renji3:matrix.org :clap: @draeder :+1: @rococtz:matrix.org important words I strongly agree with.await gun.user(pubKey).get('epub')
@bresnow WebRTC ~ 6, but non-WebRTC ~ 10K
@Manwe-777 wouldn't you have to know the hash to lookup the login, but you won't know the hash until after login?
@hownowbrowncow_8635:matrix.org it gets cached locally, yes.
@Azarattum @azarattum:matrix.org :clap: @Lexi:matrix.org . Expiry, yupe. Else you'd need to have a 2nd index that you lookup that is a ban list.
lookups in GUN are O(1), so they're efficient.
Glad you're asking for help at 5min!
isn't your.on(
getting called with both?
Oh wow, I haven't seen that github issues in years I thought it was closed... had no clue people were responding in it. (At some point... GitHub notifications just stopped/broke).
@Omarabuziad thanks for reminding a Q if it got missed! We're not perfect, so its very much appreciated if anyone just re-asks.
:clap: @bmatusiak @draeder . If you are on a permanent machine, thenfs
RAD is good enough. If you are on a machine that gets wiped/deleted every X hours, you probably want a backup in case not enough browsers are online.
@SarahKay99 looks correct. :clap: @rococtz:matrix.org . Not sure why not. doesnpm start 1337
work?
@SamiLaayouni_twitter possibly the login bug... if you hit login 3+ times, does it login?
@useWallie_twitter you should check out @davay42 's cool vue component that does that!
@SarahKay99 the Fireship chat app was public, so anyone can add/update the table, they just can't modify the message itself. With DM, you don't want a public table, so you either (A) have to https://gun.eco/docs/SEA.certify user A can edit user B's table that they both chat on or safer/better (B) "thread" the chats, by savinguserA.get(userBpubKey).set(chat);
anduserB.get(userApubKey).set(chat)
then you.map().on(function thread(){ ...
on both and pass both into the UI, that you sort. Then later on you'll want to use LEX to paginate the chat (right now this may be a bit buggy... but we're working on some cool new features to make this rock solid).
Thanks so much Mark! I got the server running, the problem was i didnt npm install . as for the chat app issue i will rethink my code. tysm
I guess I don’t understand something. Isn’t there some kind of a built in mechanism for peer discovery?
That's the plan for AXE. Don't know how far it's done already.
Does it just use the list you provide and that’s it?
The list of peers in the GUN constructor? Yes, except if using AXE which is default.
I thought gun uses webRTC under the hood, so shouldn’t the connections information be already available?
WebRTC is used for p2p communication between browsers. For browser ↔️ NodeJS clients websockets are used. Remember to import lib/webrtc.js
to enable WebRTC and even then it might not work for the current version. Would be cool if you'd test it and report back!
Does the ack in put comes from a remote peer?
I'm guessing it comes from one or all of the peers set up in the GUN constructor. If it's not properly described on the API could you report back? Extra points for testing and finding out again :-) That's kinda how it works for unstable GUN right now :\
Is there a way to know that an entire database is in sync? Let’s say I have a client making changes. I want to show user a spinner until his changes are successfully propagated through the network. (Or at least to the nearest relay peer)
The latter point is easy. As I said there's the ack
callback for that in put()
. The former could be done by recording the datetime of the last complete sync. Would that be what you want?
/gun
require('dotenv').config()
const express = require('express')
const Gun = require('gun')
const cors = require('cors')
const app = express()
app.use(cors())
app.get('/', (req, res) => {
return res.status(200).json('success')
})
app.use(Gun.serve)
app.get('*', (req, res) => {
return res.status(400).json('unsuccessful')
})
Gun({web: app.listen(Number(process.env.PORT), '0.0.0.0'), radisk: true, file: './folder'})
console.log('Server started on port ' + process.env.PORT + ' with /gun')
/gun
route always gives me a 400
npm install gun && cd node_modules/gun && npm start
gun.on('hi', function...
and 'byte'
not connected/disconnect.*
taking higher precedence?gun/gun.js
(don't build it). If React Native, see https://github.com/aethiop/jot tutorial.express.use(Gun.serve)
or express.use(Gun.serve(someDirectoryToServe))
?
hey guys quick question, is there a way to "construct" the subproperties of a chain just one level deep before returning it?
for example:
{
"name": "foo",
"address": {
"city": "bar",
"street": {
// unneeded data
}
}
}
here, i'd like to access just the name
and address.city
i thought about using load()
, but i don't really need to access all the subproperties
or will i have to do separate get()
calls to achieve this?
tldr: is there a way to include the resolution of subproperties when using on()
or once()
on a document?