ServeOptions class

Options which can be set when calling {@linkcode Deno.serve}.

Implementers
Available extensions
Annotations
  • @JS()
  • @staticInterop
  • @anonymous

Constructors

ServeOptions({num? port, String? hostname, AbortSignal? signal, bool? reusePort, Object onError([Object?])?, void onListen(dynamic)?})
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
hostname String?

Available on ServeOptions, provided by the ServeOptions$Typings extension

A literal IP address or host name that can be resolved to an IP address.
getter/setter pair
onError Object Function([Object?])?

Available on ServeOptions, provided by the ServeOptions$Typings extension

The handler to invoke when route handlers throw an error.
getter/setter pair
onListen ↔ void Function(dynamic)?

Available on ServeOptions, provided by the ServeOptions$Typings extension

The callback which is called when the server starts listening.
getter/setter pair
port num?

Available on ServeOptions, provided by the ServeOptions$Typings extension

The port to listen on.
getter/setter pair
reusePort bool?

Available on ServeOptions, provided by the ServeOptions$Typings extension

Sets SO_REUSEPORT on POSIX systems.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
signal AbortSignal?

Available on ServeOptions, provided by the ServeOptions$Typings extension

An {@linkcode AbortSignal} to close the server and all connections.
getter/setter pair

Methods

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