I am using nodejs streams to fetch data from my level database (using leveldb). Here is a snippet of the code I use:
app.get('/my/route', function (req, res, next) {
leveldb.createValueStream(options)
.pipe(map.obj(function (hash) {
level.get(somekeys, function (err, item) {
return item
})
}))
.pipe(res)
})
So far, I have been using the list-stream
module to get the data on the client side.
Now I'd like to retrieve the information on the client side as a stream. I've read this post (http://www.kdelemme.com/2014/04/24/use-socket-io-to-stream-tweets-between-nodejs-and-angularjs/) on how to do it using socket.io but I don't want to use socket.io
Is there any simple way to do it?