To append binary data to a buffer in Node.js, we call the Buffer.concat method.
For instance, we write
const newBuffer = Buffer.concat([buffer1, buffer2]);
to call Buffer.concat with an array of buffers to return a new buffer that are combined from the buffers in the array.