1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-17 19:34:02 -05:00
denoland-deno/cli/bench/http/deno_http_serve.js

12 lines
305 B
JavaScript
Raw Normal View History

// Copyright 2018-2023 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");
}
2023-04-26 23:59:32 +02:00
serve({ hostname, port, reusePort: true }, handler);