diff options
Diffstat (limited to 'tests/specs/run/045_proxy/proxy_test.ts')
-rw-r--r-- | tests/specs/run/045_proxy/proxy_test.ts | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/specs/run/045_proxy/proxy_test.ts b/tests/specs/run/045_proxy/proxy_test.ts index d04356930..70781f97d 100644 --- a/tests/specs/run/045_proxy/proxy_test.ts +++ b/tests/specs/run/045_proxy/proxy_test.ts @@ -1,14 +1,10 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { Server } from "@std/http/server.ts"; - const addr = Deno.args[1] || "localhost:4555"; -async function proxyServer() { +function proxyServer() { const [hostname, p] = addr.split(":"); const port = parseInt(p ?? 4555); - const server = new Server({ hostname, port, handler }); - console.log(`Proxy server listening on http://${addr}/`); - await server.listenAndServe(); + Deno.serve({ hostname, port }, handler); } async function handler(req: Request): Promise<Response> { |