summaryrefslogtreecommitdiff
path: root/cli/bench/http/deno_http_serve.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-04-03 19:01:02 +0200
committerGitHub <noreply@github.com>2023-04-03 19:01:02 +0200
commit51d3fb78ad2453e649d01bcc833ecfec1a05d685 (patch)
treea093cd2ad4faf1cb1fc069de8c406aeef69e1b5a /cli/bench/http/deno_http_serve.js
parent2846bbe0a3de0cc366006f97023ce146112c40c9 (diff)
refactor: remove "ext/flash" (#18578)
With https://github.com/denoland/deno/pull/18568 landed we no longer need "ext/flash". This commit removes "deno_flash" extension completely. This should have some impact on the binary and snapshot size. Closes https://github.com/denoland/deno/issues/17356
Diffstat (limited to 'cli/bench/http/deno_http_serve.js')
-rw-r--r--cli/bench/http/deno_http_serve.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/cli/bench/http/deno_http_serve.js b/cli/bench/http/deno_http_serve.js
new file mode 100644
index 000000000..a0db62630
--- /dev/null
+++ b/cli/bench/http/deno_http_serve.js
@@ -0,0 +1,11 @@
+// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
+
+const addr = Deno.args[0] ?? "127.0.0.1:4500";
+const [hostname, port] = addr.split(":");
+const { serve } = Deno;
+
+function handler() {
+ return new Response("Hello World");
+}
+
+serve(handler, { hostname, port, reusePort: true });