From b685cd49a6360f55ad2752c5225fad8fe2ac0f05 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Mon, 4 Jul 2022 16:41:16 -0700 Subject: [bench] Add a react ssr hello world --- bench/react-hello-world.deno.jsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 bench/react-hello-world.deno.jsx (limited to 'bench/react-hello-world.deno.jsx') diff --git a/bench/react-hello-world.deno.jsx b/bench/react-hello-world.deno.jsx new file mode 100644 index 000000000..25c960a80 --- /dev/null +++ b/bench/react-hello-world.deno.jsx @@ -0,0 +1,18 @@ +import { renderToReadableStream } from "https://esm.run/react-dom/server"; +import { serve } from "https://deno.land/std@0.146.0/http/server.ts"; +import * as React from "https://esm.run/react"; +const headers = { + headers: { + "Content-Type": "text/html", + }, +}; + +await serve( + async (req) => { + return new Response( + await renderToReadableStream(