Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/http.ts>Server#close

A JavaScript extension package for building strong and modern applications.
Latest
method Server.prototype.close
Re-export
import { Server } from "https://deno.land/x/ayonli_jsext@v0.9.72/http.ts";

Closes the server and stops it from accepting new connections. By default, this function will wait until all active connections to close before shutting down the server. However, we can force the server to close all active connections and shutdown immediately by setting the force parameter to true.

NOTE: In Node.js, the force parameter is only available for HTTP servers, it has no effect on HTTP2 servers.

Parameters

optional
force = [UNSUPPORTED]

Returns

Promise<void>