Created
December 6, 2012 16:58
-
-
Save kazupon/4226031 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
'use strict'; | |
var log = console.log.bind(console); | |
var format = require('util').format; | |
var kv = require('kv')('./kv'); | |
var ps = kv.put('hello/there'); | |
var rnd = Math.random(); | |
ps.write({ hello: rnd }); | |
ps.end(); | |
ps.on('close', function () { | |
var gs = kv.get('hello/there'); | |
gs.on('data', function (data) { | |
log('data:', data); | |
}); | |
}); | |
kv.list().pipe(process.stdout); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment