start method

Future<void> start({
  1. int port = 8080,
  2. String host = '127.0.0.1',
})

Binds an HttpServer on host:port and starts serving.

Implementation

Future<void> start({int port = 8080, String host = '127.0.0.1'}) async {
  final server = await HttpServer.bind(host, port);
  _server = server;
  server.listen(_handleRequest);
}