Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Stabilize Deno.serve() API #19141

Merged
merged 14 commits into from
Jul 3, 2023
Prev Previous commit
Next Next commit
don't extend Deno.ListenOptions
  • Loading branch information
bartlomieju committed Jul 3, 2023
commit a5cb59fdce85621ccc2e235c03fa6b382e66e315
17 changes: 16 additions & 1 deletion cli/tsc/dts/lib.deno.ns.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5672,7 +5672,22 @@ declare namespace Deno {
*
* @category HTTP Server
*/
export interface ServeOptions extends Partial<Deno.ListenOptions> {
export interface ServeOptions {
/** The port to listen on.
*
* @default {8000} */
port?: number;

/** A literal IP address or host name that can be resolved to an IP address.
*
* __Note about `0.0.0.0`__ While listening `0.0.0.0` works on all platforms,
* the browsers on Windows don't work with the address `0.0.0.0`.
* You should show the message like `server running on localhost:8080` instead of
* `server running on 0.0.0.0:8080` if your program supports Windows.
*
* @default {"0.0.0.0"} */
hostname?: string;

/** An {@linkcode AbortSignal} to close the server and all connections. */
signal?: AbortSignal;

Expand Down