summaryrefslogtreecommitdiff
path: root/cli/bench/testdata
diff options
context:
space:
mode:
Diffstat (limited to 'cli/bench/testdata')
-rw-r--r--cli/bench/testdata/deno_upgrade_http.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/bench/testdata/deno_upgrade_http.js b/cli/bench/testdata/deno_upgrade_http.js
index 638761cf6..e3252ffd1 100644
--- a/cli/bench/testdata/deno_upgrade_http.js
+++ b/cli/bench/testdata/deno_upgrade_http.js
@@ -1,13 +1,14 @@
const { serve, upgradeHttp } = Deno;
const u8 = Deno.core.encode("HTTP/1.1 101 Switching Protocols\r\n\r\n");
-async function handler(req) {
+async function fetch(req) {
const [conn, _firstPacket] = upgradeHttp(req);
await conn.write(u8);
await conn.close();
}
-serve(handler, {
+serve({
+ fetch,
hostname: "127.0.0.1",
port: 9000,
});