start method

  1. @override
Future<void> start()
override

Starts an HttpServer that listens by the specified _internetAddress and _port.

Implementation

@override
Future<void> start() async {
  if (_isStarted) {
    throw Exception('The server is already listening');
  }
  final handler = _pipeline.addHandler(_router.router.call);
  _server = await shelf_io.serve(handler, _internetAddress, _port);
  _isStarted = true;
}