WebServer class
The Serverpod webserver.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- httpServer → HttpServer
-
Returns the HttpServer this webserver is using to handle connections.
no setter
-
routes
→ List<
Route> -
A list of
Route
which defines how to handle path passed to the server.final - running → bool
-
Returns true if the webserver is currently running.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serverId → String
-
The server id of this server.
final
- serverpod → Serverpod
-
Reference to the Serverpod this webserver is associated with.
final
Methods
-
addRoute(
Route route, String matchPath) → void - Adds a Route to the server, together with a path that defines how calls are routed.
-
logDebug(
String msg) → void - Logs a message to stdout.
-
logError(
dynamic e, {StackTrace? stackTrace}) → void - Logs an error to stderr.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
start(
) → Future< bool> - Starts the webserver. Returns true if the webserver was started successfully.
-
stop(
) → void - Stops the webserver.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited