Skip to content

installGracefulShutdown

installGracefulShutdown(app, options?): () => void

Handles SIGTERM and SIGINT with shutdownGracefully, then re-raises the signal (or exits non-zero when the shutdown failed). A second signal while the first is being handled is ignored. Returns a function that uninstalls the handlers.

INestApplicationContext

GracefulShutdownOptions = {}

() => void