1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-18 03:44:05 -05:00

docs(cli/dts): fix http server example (#10651)

This commit is contained in:
Casper Beyer 2021-05-16 22:57:55 +08:00 committed by GitHub
parent 9f9a50a3e8
commit ac8ea823f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1161,6 +1161,7 @@ declare namespace Deno {
* Services HTTP requests given a TCP or TLS socket. * Services HTTP requests given a TCP or TLS socket.
* *
* ```ts * ```ts
* const conn = await Deno.connect({ port: 80, hostname: "127.0.0.1" });
* const httpConn = Deno.serveHttp(conn); * const httpConn = Deno.serveHttp(conn);
* const e = await httpConn.nextRequest(); * const e = await httpConn.nextRequest();
* if (e) { * if (e) {