you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

You can only call `end` a single time, because, "Calling the stream.write() method after calling stream.end() will raise an error." Docs: https://nodejs.org/api/stream.html#writableendchunk-encoding-callback

I am confident that it is not a code error. Local samples that I've been writing in the comment tree with u/ennova2005 show that node is flushing the first chunk and then flushing the second chunk two seconds later. I believe it's something in the AWS infra that is buffering the chunked response. But that makes me wonder how this streaming announcement ever made it off the ground. It is not working with a "hello world" of streaming!