From d7d2320103b28319f59e7940ebd4276c79846627 Mon Sep 17 00:00:00 2001 From: HorizonCode Date: Thu, 11 May 2023 10:29:21 +0200 Subject: [PATCH] add close func --- http_server.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/http_server.ts b/http_server.ts index d60702f..3c90da7 100644 --- a/http_server.ts +++ b/http_server.ts @@ -195,6 +195,12 @@ export class HTTPServer { } } + close() { + if (this.server) { + this.server.close(); + } + } + error(handler: RouteHandler) { this.notFoundHandler = handler; }