summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/deno_http_proxy.ts4
-rw-r--r--tools/deno_tcp.ts2
-rw-r--r--tools/deno_tcp_proxy.ts4
3 files changed, 5 insertions, 5 deletions
diff --git a/tools/deno_http_proxy.ts b/tools/deno_http_proxy.ts
index 75ea4b241..589a14338 100644
--- a/tools/deno_http_proxy.ts
+++ b/tools/deno_http_proxy.ts
@@ -1,8 +1,8 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { serve, ServerRequest } from "../std/http/server.ts";
-const addr = Deno.args[1] || "127.0.0.1:4500";
-const originAddr = Deno.args[2] || "127.0.0.1:4501";
+const addr = Deno.args[0] || "127.0.0.1:4500";
+const originAddr = Deno.args[1] || "127.0.0.1:4501";
const server = serve(addr);
async function proxyRequest(req: ServerRequest): Promise<void> {
diff --git a/tools/deno_tcp.ts b/tools/deno_tcp.ts
index 13ebe76af..9a884cb70 100644
--- a/tools/deno_tcp.ts
+++ b/tools/deno_tcp.ts
@@ -2,7 +2,7 @@
// TODO Replace this with a real HTTP server once
// https://github.com/denoland/deno/issues/726 is completed.
// Note: this is a keep-alive server.
-const addr = Deno.args[1] || "127.0.0.1:4500";
+const addr = Deno.args[0] || "127.0.0.1:4500";
const [hostname, port] = addr.split(":");
const listener = Deno.listen({ hostname, port: Number(port) });
const response = new TextEncoder().encode(
diff --git a/tools/deno_tcp_proxy.ts b/tools/deno_tcp_proxy.ts
index 487825648..bf54ad1c0 100644
--- a/tools/deno_tcp_proxy.ts
+++ b/tools/deno_tcp_proxy.ts
@@ -1,6 +1,6 @@
// Used for benchmarking Deno's tcp proxy perfromance. See tools/http_benchmark.py
-const addr = Deno.args[1] || "127.0.0.1:4500";
-const originAddr = Deno.args[2] || "127.0.0.1:4501";
+const addr = Deno.args[0] || "127.0.0.1:4500";
+const originAddr = Deno.args[1] || "127.0.0.1:4501";
const [hostname, port] = addr.split(":");
const [originHostname, originPort] = originAddr.split(":");