fix: we'll try eliminating the SERVER.shutdown
method and just use
`SERVER.stop` for everything
This commit is contained in:
parent
f63cb933dd
commit
0b5f0c5d5e
2 changed files with 2 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@andyburke/serverus",
|
"name": "@andyburke/serverus",
|
||||||
"description": "A flexible HTTP server for mixed content. Throw static files, markdown, Typescript and (hopefully, eventually) more into a directory and serverus can serve it up a bit more like old-school CGI.",
|
"description": "A flexible HTTP server for mixed content. Throw static files, markdown, Typescript and (hopefully, eventually) more into a directory and serverus can serve it up a bit more like old-school CGI.",
|
||||||
"version": "0.9.6",
|
"version": "0.9.7",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./serverus.ts",
|
".": "./serverus.ts",
|
||||||
|
|
|
@ -92,10 +92,6 @@ export class SERVER {
|
||||||
this.handlers = [];
|
this.handlers = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
private shutdown() {
|
|
||||||
this.controller?.abort();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start the server.
|
* Start the server.
|
||||||
*
|
*
|
||||||
|
@ -181,7 +177,7 @@ export class SERVER {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
this.shutdown_binding = this.shutdown.bind(this);
|
this.shutdown_binding = this.stop.bind(this);
|
||||||
Deno.addSignalListener('SIGTERM', this.shutdown_binding);
|
Deno.addSignalListener('SIGTERM', this.shutdown_binding);
|
||||||
Deno.addSignalListener('SIGINT', this.shutdown_binding);
|
Deno.addSignalListener('SIGINT', this.shutdown_binding);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue