mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> Co-authored-by: Jarred-Sumner <Jarred-Sumner@users.noreply.github.com> Co-authored-by: cirospaciari <cirospaciari@users.noreply.github.com>
9 lines
173 B
JavaScript
9 lines
173 B
JavaScript
using s = Bun.serve({
|
|
fetch(req, res) {
|
|
throw new Error("1");
|
|
},
|
|
port: 0,
|
|
});
|
|
|
|
await fetch(`http://${s.hostname}:${s.port}`).then(res => console.log(res.status));
|