Class: RouteController
Defined in: src/types/registry/Routes/BaseRouteType.ts:19
Constructors
Constructor
new RouteController(
logger
:LoggerOptions
):RouteController
Defined in: src/types/registry/Routes/BaseRouteType.ts:48
Parameters
Parameter | Type |
---|---|
logger | LoggerOptions |
Returns
RouteController
Properties
container
protected
readonly
container:Container
Defined in: src/types/registry/Routes/BaseRouteType.ts:26
Name
container
Description
The process container.
Constant
logger
protected
readonly
logger:Logger
Defined in: src/types/registry/Routes/BaseRouteType.ts:36
Name
Logger
Description
The Logger at the origin of the Jova Server.
Prefixed automatically with ApplicationRoute
.
Constant
type
readonly
type:HandlerType
=HandlerType.ROUTE
Defined in: src/types/registry/Routes/BaseRouteType.ts:46
Name
type
Description
The type for the RouteController
class, this is for when processing controllers marked with a AUTO
type in deployment.
Constant
Methods
registerApplicationRoutes()
registerApplicationRoutes(
_registry
:ApplicationRegistry
):ApplicationRoute
Defined in: src/types/registry/Routes/BaseRouteType.ts:91
Function
Parameters
Parameter | Type |
---|---|
_registry | ApplicationRegistry |
Returns
Name
registerApplicationRoutes()
Description
The register function for this route, configure your route in this.
There are NO DEFAULTS for this function, if nothing is set, the register function when the Jova server is started will fail.
run()
run(
_request
:Request
,response
:Response
):any
Defined in: src/types/registry/Routes/BaseRouteType.ts:71
Function
Parameters
Parameter | Type | Description |
---|---|---|
_request | Request | - |
response | Response |
Returns
any
Name
run()
Description
The run function for this route, 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 response
.status(HttpStatus.NotImplemented)
.json({ message: 'Route handler not implemented, server is unable to handle request.' });
@public