Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. const stream = renderToNodeStream(<MyApp/>)
  2.  
  3. // this doesn't work
  4. stream.pipe(zlib.createGzip())
  5. stream._flush = zlib.Z_SYNC_FLUSH
  6.  
  7. stream.pipe(
  8. res,
  9. { end: "false" }
  10. )
  11.  
  12. // stream.on("data", data => {
  13. // console.log(data)
  14. // })
  15. stream.on("end", () => {
  16. res.end(pageEnd())
  17. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement