1. Hook.exit
Future stop(HttpServer server)

Source

@Hook.exit
stop(HttpServer server) async {
  await server.close();
  print('<blue>Server stopped</blue>');
}