Back to Pocketbase

Function routerUse

static/jsvm/functions/routerUse.html

latest692 B
Original Source

Function routerUse

  • routerUse(...middlewares): void

RouterUse registers one or more global middlewares that are executed along the handler middlewares after a matching route is found.

Example:

routerUse((e) => { console.log(e.request.url.path) return e.next()})Copy

Note that this method is available only in pb_hooks context.

Parameters

Rest ...middlewares: (string | Middleware | ((e) => void))[]

Returns void

Settings

Member Visibility

  • Inherited

Theme

OSLightDark

Generated using TypeDoc