Skip to content

Instantly share code, notes, and snippets.

@wangsijie
Created October 23, 2021 09:03
Embed
What would you like to do?
import stream from 'stream';
app.get('/', function (req, res) {
const buffer = Buffer.from('p8AuXbAKFihL9N1H4aYi7w==', 'base64');
const bufferStream = new stream.PassThrough();
bufferStream.end(buffer);
bufferStream.pipe(res);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment