Warning: main(): unterminated entity reference _ol\]\:list-outside ol{list-style-position:outside}.\[\&_ol\]\:list-decimal ol{list-style-type:decimal}.\[\&_ol\]\:pl-4 ol{padding-left:1rem}.\[\&_ul\]\:list-outside ul{list-style-position:outside}.\[\&_ul\]\:list-disc ul{list-style-type:disc}.\[\&_ul\]\:pl-4 ul{padding-left:1rem} in /home/feelan/public_html/ir.apponweb.api/tools/agfdsjafkdsgfkyugebhekjhevbyujec.php on line 264
Write a simple HTTP server | Bun Examples
Bun

GuidesHTTP

Write a simple HTTP server with Bun

This starts an HTTP server listening on port 3000. It responds to all requests with a Response with status 200 and body "Welcome to Bun!".

See Bun.serve for details.

const server = Bun.serve({
  port: 3000,
  fetch(request) {
    return new Response("Welcome to Bun!");
  },
});

console.log(`Listening on ${server.url}`);