Last active
August 29, 2015 13:56
-
-
Save momohuri/9240910 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
server.route({ | |
method: 'GET', | |
path: '/hello', | |
handler: function (request, reply) { | |
var writestream = new stream.Stream() | |
writestream.writable = true; | |
writestream.write = function (data) { | |
return true; | |
} | |
writestream.end = function (data) { | |
} | |
writestream.write({number: 1}); | |
var readstream = new stream.Stream() | |
readstream.readable = true; | |
writestream.pipe(readstream) ; | |
reply(readstream); | |
} | |
}); |
nlf
commented
Feb 26, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment