route - mindsers/yabf GitHub Wiki
interface IRoute {
path: string,
action: string|IAction,
methodes: HttpMethod[]
}
Represents a route: a single endpoint. A Controller
contains a list of routes.
export class AController extends Controller {
get routes(): Route[] {
return [{ path: 'home', action: 'homeAction', methods: [HttpMethod.GET] }]
}
}
-
path
: The path of the endpoint -
actions
: The name or an instance of the linked route. -
methods
: List of allowed methods.