#bun.serve runs twice

1 messages · Page 1 of 1 (latest)

sand quiver
#

When i run the following, the console message is displayed twice on the server. Is this supposed to happen?

Bun.serve({
  fetch(req) {
    console.log("done");
    return new Response("Bun!");
  },
});
stray forum
#

Try console.log(req.url) I think you'll find that your browser is sending 2 requests

sand quiver
#

oh spot on! The second request is for the favicon. Do you know how i could disable the favicon from generating another response?

stray forum