Carbon
AdaptersBunFunctions

createServer

createServer(handle, options): Server

Creates a Bun server using the provided handle function and options

Parameters

ParameterTypeDescription
handleHandleThe handle function created by createHandle
optionsServerOptionsThe server options including the port and hostname

Returns

Server

The created server instance

Example

const server = createServer(handle, { ... })

On this page

Edit on GitHub