listen method

  1. @override
Future<Pharaoh> listen({
  1. int port = 3000,
})
override

Implementation

@override
Future<Pharaoh> listen({int port = 3000}) async {
  _server = await HttpServer.bind(InternetAddress.anyIPv4, port, shared: true)
    ..autoCompress = true;
  _server.listen(handleRequest);

  stdout.writeln(
      'Server started on PORT: ${_server.port} -> ${uri.scheme}://localhost:${_server.port}');
  return this;
}