diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-03-20 12:39:47 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-20 12:39:47 -0400 |
commit | 9444bd71a0b9165ef1a900f19b08a88592d2bb5c (patch) | |
tree | d48f8bf5a8d21b3646adddc20fa279532b359efd /website/index.html | |
parent | 842627d6b905f71aea821c426a886022b07270a5 (diff) |
Website and manual improvements (#1967)
Diffstat (limited to 'website/index.html')
-rw-r--r-- | website/index.html | 8 |
1 files changed, 4 insertions, 4 deletions
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 @@ <img id="logo" src="images/deno_logo_3.svg" width=200> <div> <h1>Deno</h1> - A browser-like command line runtime + A secure JavaScript/TypeScript runtime built with V8, Rust, and Tokio </div> </header> @@ -109,11 +109,11 @@ href="https://github.com/denoland/deno_install/blob/master/install.ps1">https:// <p>Or a more complex one:</p> <pre><code class="typescript language-typescript">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 }); } } |