start method

Future<void> start()

Implementation

Future<void> start() async {
  if (_server != null) {
    throw StateError('App is already started');
  }

  // Create WebhookServer hosts for each ServicePath
  _hosts = paths.map(_createHost).toList();

  // Start all hosts (they may bind routes / internal state)
  await Future.wait(_hosts!.map((h) => h.start()));

  // Finally start the HTTP server
  await _startServer();
}