diff --git a/website/index.html b/website/index.html index 349ca36e9d..fa05ecf467 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/http/server.ts";
+ import { serve } from "https://deno.land/x/std/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") });
+ for await (const { res } of s) {
+ res.respond({ body: new TextEncoder().encode("Hello World\n") });
}
}