Serve extension type

Bun serve.

on
Implemented types
Available extensions

Constructors

Serve({required Future<Response?> fetch(Request, Server), WebSocketHandler? websocket})
Creates a new Bun serve.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
hostname String
Gets/Set a serve hostname, Default is 0.0.0.0.
getter/setter pair
port int
Gets/Set a serve port.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
websocket WebSocketHandler?
Gets/Set a serve websocket handler.
getter/setter pair

Methods

fetch(Request request, Server server) JSPromise<Response?>
The serve on request call fn.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited