The class decorator.
import { Controller, ControllerBase, Describe, GET, IHttpRequest, IHttpResponse, It } from '@egomobile/http-server'
@Controller()
@Describe('My controller')
export default class MyController extends ControllerBase {
@GET()
@It('should run without error')
async index(request: IHttpRequest, response: IHttpResponse) {
// your code
}
}
Optional
options: Nilable<IDescribeOptions>Generated using TypeDoc
Marks a (controller) class to use in an environment with (unit-)tests, e.g.