bindServer static method

Future<HttpServer> bindServer(
  1. String host,
  2. int port
)

Implementation

static Future<HttpServer> bindServer(String host, int port) async {
  var server = host == 'localhost'
      ? await HttpMultiServer.loopback(port)
      : await HttpServer.bind(host, port);
  server.autoCompress = true;
  return server;
}