Skip to content

RouteMatcher

Defined in: route-matcher.ts:15

Route matcher class

new RouteMatcher(routes): RouteMatcher

Defined in: route-matcher.ts:18

RouteConfig[]

RouteMatcher

addRoute(route): void

Defined in: route-matcher.ts:53

Add a route

RouteConfig

void


getRoutes(): readonly RouteConfig[]

Defined in: route-matcher.ts:72

Get all routes

readonly RouteConfig[]


match(req): MatchedRoute | null

Defined in: route-matcher.ts:25

Match request to a route

IncomingMessage

MatchedRoute | null


removeRoute(path): boolean

Defined in: route-matcher.ts:60

Remove a route

string

boolean