From 4ef08a58dfbcf893f25fd59917aa946f455e85f2 Mon Sep 17 00:00:00 2001
From: Luca Casonato <hello@lcas.dev>
Date: Wed, 24 Aug 2022 00:08:56 +0200
Subject: feat: update `Deno.serve` function signature (#15563)

This commit changes the `Deno.serve` function signature to be more
versatile and easier to use. It is now a drop in replacement for
std/http's `serve`.

The input validation has also been reworked.
---
 cli/bench/http/deno_reactdom_ssr_flash.jsx | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

(limited to 'cli/bench/http/deno_reactdom_ssr_flash.jsx')

diff --git a/cli/bench/http/deno_reactdom_ssr_flash.jsx b/cli/bench/http/deno_reactdom_ssr_flash.jsx
index 0d749c634..42c955624 100644
--- a/cli/bench/http/deno_reactdom_ssr_flash.jsx
+++ b/cli/bench/http/deno_reactdom_ssr_flash.jsx
@@ -18,12 +18,6 @@ const headers = {
   },
 };
 
-serve(
-  {
-    fetch: async () => {
-      return new Response(await renderToReadableStream(<App />), headers);
-    },
-    hostname,
-    port,
-  },
-);
+serve({ hostname, port }, async () => {
+  return new Response(await renderToReadableStream(<App />), headers);
+});
-- 
cgit v1.2.3

