mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
20 lines
293 B
JavaScript
20 lines
293 B
JavaScript
const server = Bun.serve({
|
|
port: 0,
|
|
idleTimeout: 0,
|
|
|
|
async fetch(req) {
|
|
return new Response(
|
|
async function* () {
|
|
throw new Error("Oops");
|
|
},
|
|
{
|
|
headers: {
|
|
"X-Hey": "123",
|
|
},
|
|
},
|
|
);
|
|
},
|
|
});
|
|
|
|
process.send(`${server.url}`);
|