Created
May 18, 2020 10:09
-
-
Save SahanAmarsha/94c13c611b54ada0b1b274b25949b56b to your computer and use it in GitHub Desktop.
A simple server built in with Deno
This file contains 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"; | |
const server = serve({ port: 5000 }); | |
console.log("http://localhost:5000/"); | |
for await (const req of server) { | |
req.respond({ body: "Hello World\n" }); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment