aboutsummaryrefslogtreecommitdiff
path: root/bench/react-hello-world/react-hello-world.deno.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'bench/react-hello-world/react-hello-world.deno.jsx')
-rw-r--r--bench/react-hello-world/react-hello-world.deno.jsx25
1 files changed, 25 insertions, 0 deletions
diff --git a/bench/react-hello-world/react-hello-world.deno.jsx b/bench/react-hello-world/react-hello-world.deno.jsx
new file mode 100644
index 000000000..2b0bb9b74
--- /dev/null
+++ b/bench/react-hello-world/react-hello-world.deno.jsx
@@ -0,0 +1,25 @@
+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 App = () => (
+ <html>
+ <body>
+ <h1>Hello World</h1>
+ </body>
+ </html>
+);
+
+const headers = {
+ headers: {
+ "Content-Type": "text/html",
+ "Cache-Control": "no-transform", // disables response body auto compression, see https://deno.land/manual/runtime/http_server_apis#automatic-body-compression
+ },
+};
+
+await serve(
+ async (req) => {
+ return new Response(await renderToReadableStream(<App />), headers);
+ },
+ { port: 8080 }
+);
07 14:15:53 -0700'>2023-10-07Exclude more filesGravatar Jarred Sumner 1-1/+1 2023-10-07Exclude more filesGravatar Jarred Sumner 1-1/+2 2023-10-07Update settings.jsonGravatar Jarred Sumner 1-1/+2 2023-10-07Update settings.jsonGravatar Jarred Sumner 1-2/+3 2023-10-06fix a couple install testsGravatar Dylan Conway 1-8/+8 2023-10-06formatGravatar Dylan Conway 1-1/+2 2023-10-06Fix memory leak in fetch() (#6350)Gravatar Jarred Sumner 1-2/+0 2023-10-06[types] allow onLoad plugin callbacks to return undefined (#6346)Gravatar Silver 1-1/+1 2023-10-06docs: `file.stream()` is not a promise (#6337)Gravatar Paul Nodet 1-1/+1