diff options
author | Caleb Cox <canac@users.noreply.github.com> | 2024-09-03 10:53:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-03 17:53:42 +0200 |
commit | 203428ea14d3630f537f0e05f15bb8d56474fe36 (patch) | |
tree | a8eeda372c6c5cc53b1702264351785c9e580e4e /cli/tsc/dts/lib.deno.ns.d.ts | |
parent | 1d04c84c8f36a88697c82cf98587a5728952314f (diff) |
docs(serve): fix default `Deno.serve` hostname (#25392)
Update the docs for `Deno.serve` to reflect that the default hostname is
`0.0.0.0`, not `127.0.0.1`.
Diffstat (limited to 'cli/tsc/dts/lib.deno.ns.d.ts')
-rw-r--r-- | cli/tsc/dts/lib.deno.ns.d.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts index 893dd7a5e..8489a8de8 100644 --- a/cli/tsc/dts/lib.deno.ns.d.ts +++ b/cli/tsc/dts/lib.deno.ns.d.ts @@ -6234,14 +6234,14 @@ declare namespace Deno { /** Serves HTTP requests with the given option bag and handler. * * You can specify an object with a port and hostname option, which is the - * address to listen on. The default is port `8000` on hostname `"127.0.0.1"`. + * address to listen on. The default is port `8000` on hostname `"0.0.0.0"`. * * You can change the address to listen on using the `hostname` and `port` - * options. The below example serves on port `3000` and hostname `"0.0.0.0"`. + * options. The below example serves on port `3000` and hostname `"127.0.0.1"`. * * ```ts * Deno.serve( - * { port: 3000, hostname: "0.0.0.0" }, + * { port: 3000, hostname: "127.0.0.1" }, * (_req) => new Response("Hello, world") * ); * ``` @@ -6323,14 +6323,14 @@ declare namespace Deno { /** Serves HTTP requests with the given option bag. * * You can specify an object with a port and hostname option, which is the - * address to listen on. The default is port `8000` on hostname `"127.0.0.1"`. + * address to listen on. The default is port `8000` on hostname `"0.0.0.0"`. * * ```ts * const ac = new AbortController(); * * const server = Deno.serve({ * port: 3000, - * hostname: "0.0.0.0", + * hostname: "127.0.0.1", * handler: (_req) => new Response("Hello, world"), * signal: ac.signal, * onListen({ port, hostname }) { |