Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/middleware/mod.ts>Middleware#runAndThen

If you're gonna implement middlewares, you should do it right! ;)
Latest
method Middleware.prototype.runAndThen
import { Middleware } from "https://deno.land/x/middleware@1.2.0/mod.ts";

Run the middlewares stored on this object and then pass a custom last next function.

Parameters

optional
lastNext: NextFn

The last next function.

...args: [...Parameters<Callback>, NextFn | undefined | void]

The arguments to pass to each middleware.

Returns

Promise<void | Diagnostics<Callback>>