Deno.HttpServer.shutdown - Deno documentation
method Deno.HttpServer.shutdown
HttpServer.shutdown(): Promise<void>

Gracefully close the server. No more new connections will be accepted, while pending requests will be allowed to finish.

Return Type

Promise<void>