Created
May 12, 2018 23:06
-
-
Save hackergrrl/88a18d41efa0f13c2bce1e50fe7e485f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ram = require('random-access-memory') | |
var hyperdb = require('hyperdb') | |
var alice = hyperdb(ram, { valueEncoding: 'json' }) | |
alice.put('foo/bar', 'baz', function () { | |
alice.put('foo/2', { some: 'json' }, function () { | |
var bob = hyperdb(ram, alice.key, { valueEncoding: 'json' }) | |
bob.ready(function () { | |
alice.authorize(bob.local.key, function () { | |
bob.put('a/b', 12, function () { | |
alice.put('foo/hup', 'beep', function () { | |
}) | |
}) | |
}) | |
}) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment