1
0
Fork 0
mirror of https://github.com/kou029w/_.git synced 2025-01-31 06:18:07 +00:00
_/deno/server.ts

11 lines
262 B
TypeScript
Raw Normal View History

2020-06-12 16:38:57 +09:00
import { serve } from "https://deno.land/std@0.56.0/http/server.ts";
async function main() {
const port = 8000;
console.log(`http://localhost:${port}/`);
for await (const req of serve({ port })) {
req.respond({ body: "Hello World\n" });
}
}
main();