diff options
| author | Ryan Dahl <ry@tinyclouds.org> | 2018-11-08 04:01:20 -0500 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2018-11-08 04:01:20 -0500 |
| commit | e97fdcac47a7ff53143b15e6686a773bd6202e10 (patch) | |
| tree | 6e062fca0fe151fcce1a277a4063b64e2aa38ded /README.md | |
| parent | d35e13e6beb6825a85a2518adebcc8afd91360af (diff) | |
Add BufReader.peek()
Original: https://github.com/denoland/deno_std/commit/90cbca40beb7f5523f7ac99b5f317b727d4df3a4
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -2,9 +2,12 @@ [](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" }); +} ``` |
