mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 03:18:53 +00:00
9 lines
184 B
JavaScript
9 lines
184 B
JavaScript
const s = Bun.serve({
|
|
fetch(req, res) {
|
|
s.stop(true);
|
|
throw new Error("1");
|
|
},
|
|
port: 0,
|
|
});
|
|
fetch(`http://${s.hostname}:${s.port}`).then(res => console.log(res.status));
|