aboutsummaryrefslogtreecommitdiff
path: root/bench/react-hello-world.deno.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'bench/react-hello-world.deno.jsx')
-rw-r--r--bench/react-hello-world.deno.jsx18
1 files changed, 18 insertions, 0 deletions
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(<div>Hello World</div>),
+ headers
+ );
+ },
+ { port: 8080 }
+);