News for hackers. Stuff that matters.
Re:Node.js stream behaviour illustrated. by farhanpatel on Saturday July 07, 2012 @12:48AM (#4210753)
Could someone please enlighten me on how to connect both a readable and a writable stream.

For example I want to convert an image and then stream it to S3.

if I use knox https://github.com/LearnBoost/knox it has a way to read a stream from a file and then publish to s3.

But how can you take a stream from http://aheckmann.github.com/gm/ and stream it directly to knox or anything else for that matter?

Re:Node.js stream behaviour illustrated. by jdub on Saturday July 07, 2012 @12:56AM (#4210766)
Take a look at the pipe() method. :-)
Re:Node.js stream behaviour illustrated. by dominictarr on Saturday July 07, 2012 @07:47AM (#4211411)
something like gm(knox.getStream(...)).write(knox.putStream(...)) unfortunately gm doesn't expose it's streams nicely, so you have to pass them in.