• Marks a class as controller.

    Returns ClassDecorator

    The class decorator.

    Example

    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