Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
boot() {
// get settings from DI container
this.ENVIRONMENT = di_1.Container.get("ENVIRONMENT");
terminus(di_1.Container.get(server_1.Server).getServer(), {
// healtcheck options
healthChecks: {
// for now we only resolve a promise to make sure the server runs
"/_health/liveness": () => Promise.resolve(),
// make sure we are ready to answer requests
"/_health/readiness": () => di_1.Container.get(boot_loader_1.BootLoader).getReadyPromise()
},
// cleanup options
timeout: 1000,
logger: this.logger.info
});
// release resources here before node exits
exitHook((callback) => __awaiter(this, void 0, void 0, function* () {
this.logger.info("exiting");
this.logger.info("starting cleanup");
this.emit("exiting", this.ENVIRONMENT.nodeId);
__param(2, di_1.Inject((type) => server_1.Server)),
__param(3, di_1.Inject((type) => boot_loader_1.BootLoader)),
__param(1, di_1.Inject(type => server_1.Server)),
__param(2, di_1.Inject(type => boot_loader_1.BootLoader)),
__param(1, di_1.Inject((type) => server_1.Server)),
__param(2, di_1.Inject((type) => boot_loader_1.BootLoader)),
__param(4, di_1.Inject((type) => server_1.Server)),
__param(5, di_1.Inject((type) => db_1.DbGeneralPool)),