createServer static method

Future<Http> createServer({
  1. String host = 'localhost',
  2. int port = 8080,
})

Implementation

static Future<Http> createServer({
  String host = 'localhost',
  int port = 8080,
}) async {
  final server = await HttpServer.bind(host, port);

  return Http._(server, host, port);
}