summaryrefslogtreecommitdiff
path: root/cli/bench/http/deno_http_flash.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-08-19 14:36:01 +0200
committerGitHub <noreply@github.com>2022-08-19 14:36:01 +0200
commit5beec3f106b0890cc76150d0e3b3661c576d4c3b (patch)
tree9692e24bdb5a7e1d1c883b91961cdacff3e6708c /cli/bench/http/deno_http_flash.js
parent1848c7e361f1a3a33487b60ab6fcb61ed1f62273 (diff)
feat(unstable): change Deno.serve() API (#15498)
- Merge "Deno.serve()" and "Deno.serveTls()" API - Remove first argument and use "fetch" field options instead - Update type declarations - Add more documentation
Diffstat (limited to 'cli/bench/http/deno_http_flash.js')
-rw-r--r--cli/bench/http/deno_http_flash.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/bench/http/deno_http_flash.js b/cli/bench/http/deno_http_flash.js
index 5d3de68f4..3823bb9cd 100644
--- a/cli/bench/http/deno_http_flash.js
+++ b/cli/bench/http/deno_http_flash.js
@@ -4,11 +4,12 @@ const addr = Deno.args[0] || "127.0.0.1:4500";
const [hostname, port] = addr.split(":");
const { serve } = Deno;
-function handler() {
+function fetch() {
return new Response("Hello World");
}
-serve(handler, {
+serve({
+ fetch,
hostname,
port,
});