HonoH
Hono11mo ago
Mosh Ontong

How to pipe the archive in stream hono?

  const streamPipe = new PassThrough();
    archive.pipe(streamPipe);

    const write = new WritableStream();

    
    return stream(
      c,
      async (stream) => {
        streamPipe.pipe(stream);
      },
      async (err, stream) => {
        stream.writeln("An error occurred while streaming the file.");
        logger.error(err);
      }
    );
Was this page helpful?