start method

Future<bool> start({
  1. bool shareHttpServer = false,
})

Starts this instance, allowing it to receive HTTP requests.

Do not invoke this method directly.

Implementation

Future<bool> start({bool shareHttpServer = false}) async {
  logger.fine('ApplicationServer($identifier).start entry');
  channel = channelBuilder();
  await channel!.initialize(options);
  await channel!.prepare();
  channel!.entryPoint();

  logger.fine('ApplicationServer($identifier).start binding HTTP');
  _requiresHTTPS = securityContext != null;

  server = await shelf_io.serve(channel!, options.address, options.port,
      securityContext: securityContext, shared: shareHttpServer);

  logger.fine('ApplicationServer($identifier).start bound HTTP');
  return Future.value(true);
}