IServerLifecycle Interface

Module
import { IServerLifecycle } from "@tsed/common"
Source/packages/common/src/server/interfaces/IServerLifeCycle.ts

Overview

interface IServerLifecycle {
    version: any;
    $onInit?(): void | Promise<;any>;;
    $onMountingMiddlewares?: Function;
    $afterRoutesInit?: Function;
    $onReady?: Function;
    $onServerInitError?(error: any): any;
}

Description

ServerLoader lifecycle let you intercept a phase.

Members

version: any

$onInit?(): void | Promise<;any>;

This method is called when the server starting his lifecycle.


$onMountingMiddlewares?: Function

$afterRoutesInit?: Function

$onReady?: Function

$onServerInitError?(error: any): any