summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Wieruch <wrobin@gmx.net>2020-05-26 16:09:47 +0200
committerGitHub <noreply@github.com>2020-05-26 10:09:47 -0400
commit845bc443da6026903aefa7a6556ecc7c0de371fe (patch)
tree0e991008d7d487153c565d3697f96d940ee6c4e4
parent44477596eda3ca50ea6597d4af1fd809a01e2bdc (diff)
improve docs (#5873)
-rw-r--r--docs/tools/debugger.md4
-rw-r--r--std/http/README.md4
-rw-r--r--std/http/server.ts4
3 files changed, 6 insertions, 6 deletions
diff --git a/docs/tools/debugger.md b/docs/tools/debugger.md
index 5725d029a..8bd499038 100644
--- a/docs/tools/debugger.md
+++ b/docs/tools/debugger.md
@@ -108,10 +108,10 @@ This time let's try with local source file, create `server.ts`:
```ts
import { serve } from "https://deno.land/std@v0.50.0/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" });
}
```
diff --git a/std/http/README.md b/std/http/README.md
index 4e30a3a56..0f97fd0c0 100644
--- a/std/http/README.md
+++ b/std/http/README.md
@@ -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" });
}
```
diff --git a/std/http/server.ts b/std/http/server.ts
index a372b39a5..787820a56 100644
--- a/std/http/server.ts
+++ b/std/http/server.ts
@@ -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 });
* }
*/