blob: 462e15e0e2accb576cb7bf7df67e22bc71a9e89d (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { serve } from "./server.ts";
const addr = Deno.args[1] || "127.0.0.1:4500";
const server = serve(addr);
const body = new TextEncoder().encode("Hello World");
console.log(`http://${addr}/`);
for await (const req of server) {
req.respond({ body });
}
|