# IServerLifecycle Interface deprecated
Module | import { IServerLifecycle } from "@tsed/common" |
---|---|
Source | /packages/common/src/platform-express/interfaces/IServerLifeCycle.ts |
# Overview
interface IServerLifecycle extends IHooks {
version: any;
/**
* This method is called when the server starting his lifecycle.
* @deprecated use $beforeInit
*/
$onInit?(): void | Promise<any>;
/**
* @deprecated use $beforeRoutesInit instead
*/
$onMountingMiddlewares?(): void | Promise<any>;
/**
* @deprecated use $afterRoutesInit
*/
$onRoutesInit?(): void | Promise<any>;
/**
* @deprecated use $onReady
*/
$onServerReady?(): void | Promise<any>;
/**
* @deprecated will be removed in favor of promise rejection
*/
$onServerInitError?(error: any): any;
}
# Members
version: any;
$onInit?(): void | Promise<any>;
This method is called when the server starting his lifecycle.
$onMountingMiddlewares?(): void | Promise<any>;
$onRoutesInit?(): void | Promise<any>;
$onServerReady?(): void | Promise<any>;
$onServerInitError?(error: any): any;
- Session & cookies
- Passport.js
- TypeORM
- Mongoose
- GraphQL
- Socket.io
- Swagger
- AJV
- Multer
- Serve static files
- Templating
- Throw HTTP Exceptions
- Customize 404
- AWS
- Jest
- Seq
- Controllers
- Providers
- Model
- Converters
- Middlewares
- Pipes
- Interceptors
- Authentication
- Hooks
- Injection scopes
- Custom providers
- Custom endpoint decorator
- Testing