admin 管理员组文章数量: 1086019
NestJS includes a lot of tools that seem to function as specialized versions of middleware like guards, interceptors, and filters.
What is the order of execution between all of these?
My understanding is that the order of execution goes like this:
Middleware -> Guards -> Interceptors -> Pipes -> Controllers -> Interceptors -> res.on('finish')
handlers set up in middleware
NestJS includes a lot of tools that seem to function as specialized versions of middleware like guards, interceptors, and filters.
What is the order of execution between all of these?
My understanding is that the order of execution goes like this:
Middleware -> Guards -> Interceptors -> Pipes -> Controllers -> Interceptors -> res.on('finish')
handlers set up in middleware
1 Answer
Reset to default 7This is mented on in the docs
Your understanding though, is correct, the docs go into a bit more detail when it es to running multiple of each type and how they order at that point. Definitely worth the read.
本文标签:
版权声明:本文标题:javascript - What is the precise order of execution between middleware, guards, interceptors, pipes, filters, etc? - Stack Overf 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/p/1741582063a2303919.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论