Local Requests

Server Enviroment
Client Enviroment

NOTE

There can be only one request and no more with the same name across all controllers.

Decorators

Name Arguments Description
@OnRequest() name?: string Listens to local requests and returns a value back to the local enviroment.

@OnRequest()

To listen to an RPC, use the OnRequest decorator.

@Controller()
export class MangoController {
    @OnRequest('mangoColor')
    public getMangoColor() {
        // Do something
        return 'green';
    }
}
ts
Last update at: 2024/04/29 10:15:50