Last active
June 25, 2018 11:41
-
-
Save datafatmunger/cbbeb1dcc030d88cf9570cf02175f78a 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 crypto = require('crypto'), | |
| hyperdb = require('hyperdb'), | |
| cms = require('random-access-idb')('cms')('cms.txt'); | |
| var db = hyperdb((filename) => { | |
| return cms; | |
| }); | |
| db.put("hello", "world", (err) => { | |
| if(err) throw err; | |
| db.get("hello", (err, nodes) => { | |
| if(err) throw err; | |
| console.log(JSON.stringify(nodes)); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment