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.

  app.use

  Middleware functions are executed sequentially, therefore the order of middleware inclusion is important.

  app.use

参考:http://www.expressjs.com.cn/4x/api.html#app.use

上一篇:html常用标签表单和表格等及css的简单入门


下一篇:[C#]循环输出 000 - 999999