From 9444bd71a0b9165ef1a900f19b08a88592d2bb5c Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 20 Mar 2019 12:39:47 -0400 Subject: Website and manual improvements (#1967) --- website/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'website/index.html') diff --git a/website/index.html b/website/index.html index 238128823..9f6e4b4bf 100644 --- a/website/index.html +++ b/website/index.html @@ -17,7 +17,7 @@

Deno

- A browser-like command line runtime + A secure JavaScript/TypeScript runtime built with V8, Rust, and Tokio
@@ -109,11 +109,11 @@ href="https://github.com/denoland/deno_install/blob/master/install.ps1">https://

Or a more complex one:

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