首页 > 移动平台 > 详细

app.use

时间:2017-01-29 23:54:35      阅读:532      评论:0      收藏:0      [点我收藏+]

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

原文:http://www.cnblogs.com/tekkaman/p/6357822.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!