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 denobot committed Jan 31, 2021
1 parent db07e02 commit a7d1976
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 a7d1976

Please sign in to comment.