Created
November 12, 2012 21:31
-
-
Save juliangruber/4062042 to your computer and use it in GitHub Desktop.
This file contains 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 timeseries = require('timeseries') | |
var ts = timeseries('./db') | |
var s = ts.createStream() | |
s.pipe(net.connect(3000)).pipe(s) | |
// display chart with realtime updates! | |
ts('the-id').createRangeStream(start).pipe(listener) | |
ts('the-id').get(1337, cb) | |
// set at given date | |
ts('the-id').add(1337, '324,345,456,657') | |
// set at current date | |
ts('the-id').add('324,345,456,657') | |
// store min-max | |
ts.on('update', function (id, k, v) { | |
// logic... | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment