MCPcopy Create free account
hub / github.com/avoidwork/tenso / signals

Method signals

src/tenso.js:359–368  ·  view source on GitHub ↗

* Sets up signal handlers for graceful server shutdown * @returns {Tenso} The Tenso instance for method chaining

()

Source from the content-addressed store, hash-verified

357 * @returns {Tenso} The Tenso instance for method chaining
358 */
359 signals () {
360 for (const signal of [SIGHUP, SIGINT, SIGTERM]) {
361 process.on(signal, () => {
362 this.stop();
363 process.exit(0);
364 });
365 }
366
367 return this;
368 }
369
370 /**
371 * Starts the HTTP or HTTPS server

Callers 1

initMethod · 0.95

Calls 1

stopMethod · 0.95

Tested by

no test coverage detected