Created
July 12, 2019 02:26
-
-
Save bobharley/c0040b6380313e1f309ccbd5159821b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { serve } from "https://deno.land/[email protected]/http/server.ts"; | |
async function main() { | |
const body = new TextEncoder().encode("Hello World\n"); | |
for await (const req of serve(":8000")) { | |
req.respond({ body }); | |
} | |
} | |
main(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment