Skip to content

Instantly share code, notes, and snippets.

@halvardssm
Last active May 20, 2021 19:39
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 halvardssm/d47d616017fc800060c8e00d92f5069a to your computer and use it in GitHub Desktop.
Save halvardssm/d47d616017fc800060c8e00d92f5069a to your computer and use it in GitHub Desktop.
import { serve } from "https://deno.land/std@0.87.0/http/server.ts";
const port = 8080;
const server = serve({ port });
console.log(`Server is accessible @ http://localhost:${port}/`);
for await (const req of server) {
req.respond({ body: `Hello World!` })
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment