mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
16 lines
347 B
JavaScript
Generated
16 lines
347 B
JavaScript
Generated
// Reduce memory pressure by not cloning the buffer each Response.
|
|
const payload = new Blob([Buffer.alloc(64 * 64 * 1024, "X")]);
|
|
|
|
const server = Bun.serve({
|
|
port: 0,
|
|
idleTimeout: 0,
|
|
async fetch(req) {
|
|
return new Response(payload);
|
|
},
|
|
});
|
|
if (process.send) {
|
|
process.send(server.url.href);
|
|
} else {
|
|
console.log(server.url.href);
|
|
}
|