首页 > 代码库 > app.use
app.use
【app.use】
app.use([path,] function [, function...])
Mounting a middleware at a path
will cause the middleware function to be executed whenever the base of the requested path matches the path
.
当basePath匹配时,use监听会被调用。
Since path
defaults to “/”, middleware mounted without a path will be executed for every request to the app.
Middleware functions are executed sequentially, therefore the order of middleware inclusion is important.
参考:http://www.expressjs.com.cn/4x/api.html#app.use
app.use
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。