Differences between terminal middleware vs non-terminal?
middleware
Type Description
Terminal Ends the pipeline. Doesn’t call next(). E.g., app.Run()
Non-Termi
nal
Calls next() and allows other middlewares to run after it.
E.g., app.Use()
Terminal middleware:
app.Run(async ctx => {
await ctx.Response.WriteAsync("This ends the pipeline");
});