handle method

void handle(
  1. HttpRequest request
)

Handles an incoming HttpRequest by running global middleware, then dispatching to the router.

This is the main entry point for HTTP request processing.

HttpServer.bind('0.0.0.0', 8080).then((server) {
  server.listen(kernel.handle);
});

Implementation

void handle(HttpRequest request) async {
  await Session.init(request);
  // print("================");
  // print(session?.toMetaJson());
  // print("================");
  _runMiddleware(request, 0);
}