summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-11-08 04:01:20 -0500
committerRyan Dahl <ry@tinyclouds.org>2018-11-08 04:01:20 -0500
commite97fdcac47a7ff53143b15e6686a773bd6202e10 (patch)
tree6e062fca0fe151fcce1a277a4063b64e2aa38ded /README.md
parentd35e13e6beb6825a85a2518adebcc8afd91360af (diff)
Add BufReader.peek()
Original: https://github.com/denoland/deno_std/commit/90cbca40beb7f5523f7ac99b5f317b727d4df3a4
Diffstat (limited to 'README.md')
-rw-r--r--README.md9
1 files changed, 6 insertions, 3 deletions
diff --git a/README.md b/README.md
index f27d51a8b..614e53087 100644
--- a/README.md
+++ b/README.md
@@ -2,9 +2,12 @@
[![Build Status](https://travis-ci.com/denoland/net.svg?branch=master)](https://travis-ci.com/denoland/net)
-
Usage:
+
```typescript
-import { Reader } from "https://deno.land/x/net/bufio.ts";
-// TODO Example.
+import { serve } from "https://deno.land/x/net/http.ts";
+const s = serve("0.0.0.0:8000");
+for await (const req of s) {
+ req.respond({ body: "Hello World\n" });
+}
```