Trying to achieve this below scenario, which for some reason is turning out to be complex than is necessary - any help is highly appreciated:
I have a db setup locally with the following example code
const db = hyperdb('./my.db', {valueEncoding: 'utf-8'})
db.put('foo/bar/baz', 'hi')
Now, from the docs it is clear that with db.discoveryKey this local data should become accessible remotely
What is not clear is, how to use this db.discoveryKey to query the value of foo/bar/baz ?
In other words, I have a db.discoveryKey and I have a field key - I am just interested in getting the latest value for that field key (and possibly its history, if required), without worrying about keeping the data in sync at the remote.
Is there some API call or some simple way to do this? Setting up replication, sockets, network sync seems to be overkill for such simple task. There must be a simpler way that I seem to be missing.
Trying to achieve this below scenario, which for some reason is turning out to be complex than is necessary - any help is highly appreciated:
db.discoveryKey
this local data should become accessible remotelydb.discoveryKey
to query the value offoo/bar/baz
?In other words, I have a
db.discoveryKey
and I have a fieldkey
- I am just interested in getting the latest value for that field key (and possibly its history, if required), without worrying about keeping the data in sync at the remote.Is there some API call or some simple way to do this? Setting up replication, sockets, network sync seems to be overkill for such simple task. There must be a simpler way that I seem to be missing.