start method
Start the server
Implementation
@override
Future<void> start(
Handler handler, {
String context = 'utopia',
String? path,
}) async {
var shelfHandler = (shelf.Request request) => _handleRequest(
request,
context,
handler,
);
if (path != null) {
shelfHandler = shelf.Cascade()
.add(createStaticHandler(path))
.add(
(request) => _handleRequest(
request,
context,
handler,
),
)
.handler;
}
_server = await shelf_io.serve(
shelfHandler,
address,
port,
securityContext: securityContext,
shared: true,
);
}