BaseController
The BaseController class is used as a basis for creating new controllers. It has logControllerRegister and logControllerEntry methods that are useful when initializing a new controller and creating new handler methods.
import { BaseController } from '@archibald/server';
export class SomeController extends BaseController {
constructor() {
super('SomeController'); // Will call logControllerRegister method.
}
handlerMethod(request: Request, h: ResponseToolkit) {
this.logControllerEntry(request, 'handlerMethod', this.name);
// Logic
}
}