Skip to main content
Module

x/servest/benchmark/listen_bench.ts

🌾A progressive http server for Deno🌾
Latest
File
// Copyright 2019-2020 Yusuke Sakurai. All rights reserved. MIT license.import { listenAndServe } from "../server.ts";
const addr = Deno.args[1] || "127.0.0.1:4500";const body = new TextEncoder().encode("Hello World");
async function main(): Promise<void> { listenAndServe(addr, (req) => { return req.respond({ status: 200, body }); });}
main();