add close func

This commit is contained in:
HorizonCode 2023-05-11 10:29:21 +02:00
parent 8c2a3eb798
commit d7d2320103

View File

@ -195,6 +195,12 @@ export class HTTPServer {
} }
} }
close() {
if (this.server) {
this.server.close();
}
}
error(handler: RouteHandler) { error(handler: RouteHandler) {
this.notFoundHandler = handler; this.notFoundHandler = handler;
} }