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

std/http/mod.ts>Server#close

The Deno Standard Library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
method Server.prototype.close
import { Server } from "https://deno.land/std@0.222.1/http/mod.ts";

Immediately close the server listeners and associated HTTP connections.

Throws a server closed error if called after the server has been closed.