1
0
Fork 0
mirror of https://github.com/kou029w/_.git synced 2025-01-30 22:08:02 +00:00
_/deno/server.ts
2020-07-21 00:43:30 +09:00

10 lines
262 B
TypeScript

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();