Skip to content

Instantly share code, notes, and snippets.

@khaosdoctor
Last active June 2, 2020 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save khaosdoctor/cd2bbb28e682feb8d20a7aba47fc1e17 to your computer and use it in GitHub Desktop.
Save khaosdoctor/cd2bbb28e682feb8d20a7aba47fc1e17 to your computer and use it in GitHub Desktop.
Deno Hello World Server
import { serve } from "https://deno.land/std@0.54.0/http/server.ts"
const handler = serve({ port: 80 })
console.log("Serving at 80")
for await (const req of handler) {
req.respond({ body: "Hello World!\n" })
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment