The class decorator.
import { Controller, ControllerBase, GET, IHttpRequest, IHttpResponse } from '@egomobile/http-server'
@Controller() // all default class exports have to be
// marked with that decorator
// to use them as controllers
export default class MyController extends ControllerBase {
@GET()
async foo(request: IHttpRequest, response: IHttpResponse) {
response.write('foo: ' + new Date())
}
}
Generated using TypeDoc
Marks a class as controller.