Skip to main content

Class: MiddlewareController

Defined in: src/types/registry/Middlewares/BaseMiddlewareType.ts:19

Constructors​

Constructor​

new MiddlewareController(logger: LoggerOptions): MiddlewareController

Defined in: src/types/registry/Middlewares/BaseMiddlewareType.ts:48

Parameters​

ParameterType
loggerLoggerOptions

Returns​

MiddlewareController

Properties​

container​

protected readonly container: Container

Defined in: src/types/registry/Middlewares/BaseMiddlewareType.ts:26

Name​

container

Description​

The process container.

Constant​


logger​

protected readonly logger: Logger

Defined in: src/types/registry/Middlewares/BaseMiddlewareType.ts:36

Name​

Logger

Description​

The Logger at the origin of the Jova Server.

Prefixed automatically with ApplicationEvent.

Constant​


type​

readonly type: HandlerType = HandlerType.MIDDLEWARE

Defined in: src/types/registry/Middlewares/BaseMiddlewareType.ts:46

Name​

type

Description​

The type for the MiddlewareController class, this is for when processing controllers marked with a AUTO type in deployment.

Constant​

Methods​

run()​

run(_request: Request, _response: Response, next?: NextFunction): any

Defined in: src/types/registry/Middlewares/BaseMiddlewareType.ts:70

Function

Parameters​

ParameterTypeDescription
_requestRequest-
_responseResponse-
next?NextFunction

Returns​

any

Name​

run()

Description​

The run function for this middleware, this function cannot be redefined to use another name, but only the content within the function.

Placeholder run function if nothing is defined:

Example​

return next();

@public

setApplicationMiddlewareOptions()​

setApplicationMiddlewareOptions(): MiddlewareOptions

Defined in: src/types/registry/Middlewares/BaseMiddlewareType.ts:84

Function

Returns​

MiddlewareOptions

Name​

setApplicationMiddlewareOptions()

Description​

Set the details for this middleware.