app.use inserts app.use into the pipeline that requires calling the next middleware by calling next.Invoke ().
app.run inserts middleware without the following, so it just starts.
Using app.map you can map the paths that are evaluated at runtime for each request to run a specific middleware only if the request path matches the pattern that you matched.
See the docs for use and run and map for more details.
source share