summaryrefslogtreecommitdiff
path: root/cli/bench/http/deno_reactdom_ssr_flash.jsx
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2022-08-24 00:08:56 +0200
committerGitHub <noreply@github.com>2022-08-24 00:08:56 +0200
commit4ef08a58dfbcf893f25fd59917aa946f455e85f2 (patch)
tree7b1e07869fd23f1ce65029ab3725b9ef054f7576 /cli/bench/http/deno_reactdom_ssr_flash.jsx
parentf0993f413b86997674ea4bc6812af7d2c529ec96 (diff)
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.
Diffstat (limited to 'cli/bench/http/deno_reactdom_ssr_flash.jsx')
-rw-r--r--cli/bench/http/deno_reactdom_ssr_flash.jsx12
1 files changed, 3 insertions, 9 deletions
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);
+});