This page summarizes the information & use of the middleware component.
@Middleware(regexRoute: RegExp)
import { Middleware, MiddlewareTarget } from"https://deno.land/x/mandarinets/mod.ts";@Middleware(newRegExp('/api/*'))exportclassMiddleware1implementsMiddlewareTarget {// To be executed on pre-request of a request which url matches the middleware's regular expression routepubliconPreRequest(@ResponseParam() response:any):boolean {/** * True = the request must continue, * False = the request will stop */returntrue; }// To be executed on post-request of a request which url matches the middleware's regular expression routepubliconPostRequest():void { }}