From 36eecad14816f7f6b2acd3cc14d50bbf89ee0abd Mon Sep 17 00:00:00 2001 From: Dmitry Teplov Date: Wed, 20 Feb 2019 06:53:03 +0300 Subject: fix: revert http server example on the homepage (#1814) --- website/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'website') diff --git a/website/index.html b/website/index.html index fa05ecf46..8e374d03a 100644 --- a/website/index.html +++ b/website/index.html @@ -104,12 +104,12 @@ href="https://github.com/denoland/deno_install/blob/master/install.ps1">https://

Or a more complex one:

-
import { serve } from "https://deno.land/x/std/http/server.ts";
+      
import { serve } from "https://deno.land/x/std@v0.2.10/http/server.ts";
 const s = serve("0.0.0.0:8000");
 
 async function main() {
-  for await (const { res } of s) {
-    res.respond({ body: new TextEncoder().encode("Hello World\n") });
+  for await (const req of s) {
+    req.respond({ body: new TextEncoder().encode("Hello World\n") });
   }
 }
 
-- 
cgit v1.2.3