Skip to content

Commit

Permalink
improve docs (denoland/deno#5873)
Browse files Browse the repository at this point in the history
  • Loading branch information
rwieruch authored and caspervonb committed Jan 31, 2021
1 parent 33a7c85 commit 2b7a470
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

```typescript
import { serve } from "https://deno.land/std/http/server.ts";
const s = serve({ port: 8000 });
const server = serve({ port: 8000 });
console.log("http://localhost:8000/");
for await (const req of s) {
for await (const req of server) {
req.respond({ body: "Hello World\n" });
}
```
Expand Down
4 changes: 2 additions & 2 deletions http/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ export type HTTPOptions = Omit<Deno.ListenOptions, "transport">;
*
* import { serve } from "https://deno.land/std/http/server.ts";
* const body = "Hello World\n";
* const s = serve({ port: 8000 });
* for await (const req of s) {
* const server = serve({ port: 8000 });
* for await (const req of server) {
* req.respond({ body });
* }
*/
Expand Down

0 comments on commit 2b7a470

Please sign in to comment.