function
bun.serve
Bun.serve starts a high-performance HTTP server with built-in routing. Routes can be static responses, handler functions, or per-method handler objects, with type-safe path parameters.
@param options
Server configuration options
Basic Usage
Bun.serve({
port: 3000,
fetch(req) {
return new Response("Hello World");
}
});