1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00

docs(ext/net): explain port: 0 behavior (#24475)

This commit is contained in:
Asher Gomez 2024-07-09 16:57:27 +10:00 committed by GitHub
parent c3b168f5a2
commit 77c5a336ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -6257,6 +6257,8 @@ declare namespace Deno {
*/ */
export interface ServeOptions { export interface ServeOptions {
/** The port to listen on. /** The port to listen on.
*
* Set to `0` to listen on any available port.
* *
* @default {8000} */ * @default {8000} */
port?: number; port?: number;

View file

@ -135,7 +135,10 @@ declare namespace Deno {
/** @category Network */ /** @category Network */
export interface ListenOptions { export interface ListenOptions {
/** The port to listen on. */ /** The port to listen on.
*
* Set to `0` to listen on any available port.
*/
port: number; port: number;
/** A literal IP address or host name that can be resolved to an IP address. /** A literal IP address or host name that can be resolved to an IP address.
* *