码迷,mamicode.com
首页 > 移动开发 > 详细

app.use

时间:2017-01-29 23:55:25      阅读:357      评论:0      收藏:0      [点我收藏+]

标签:htm   use   调用   color   function   ant   efault   pre   without   

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

标签:htm   use   调用   color   function   ant   efault   pre   without   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!