diff options
Diffstat (limited to 'cli/bench/http/deno_http_flash.js')
-rw-r--r-- | cli/bench/http/deno_http_flash.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cli/bench/http/deno_http_flash.js b/cli/bench/http/deno_http_flash.js new file mode 100644 index 000000000..5d3de68f4 --- /dev/null +++ b/cli/bench/http/deno_http_flash.js @@ -0,0 +1,14 @@ +// Copyright 2018-2022 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, +}); |