Skip to content

Instantly share code, notes, and snippets.

@SahanAmarsha
Created May 18, 2020 10:09
Show Gist options
  • Save SahanAmarsha/94c13c611b54ada0b1b274b25949b56b to your computer and use it in GitHub Desktop.
Save SahanAmarsha/94c13c611b54ada0b1b274b25949b56b to your computer and use it in GitHub Desktop.
A simple server built in with Deno
import { serve } from "https://deno.land/std@0.50.0/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