Webroute

createLinearRouter

createLinearRouter<T>(initialRoutes): RequestRouter<T>

Creates a linear web router.

Route matching is determined by:

  1. Method specificity: more specific methods are prioritised, wildcards deprioritised.
  2. Registration order: within a method, routes registered earlier are prioritised.

Type Parameters

Type Parameter
T

Parameters

ParameterType
initialRoutesRouteInput<T>[]

Returns

RequestRouter<T>

On this page