Nginx NodeJS Express - Router 7
http://www.codes51.com/article/detail_2787757_7.html
结论:app.get挂载‘/’的路由只响应跟'/'精确匹配的GET请求。 而app.use挂载的'/'的路由响应所有以'/' 为起始路由的路由,
且不限制HTTP访问的方法。以下说明:Mounting a middleware at a path will cause the middleware function to be
executed whenever the base of the requested path matches the path.
1 app.use([path], [function...], function) 2 Mount the middleware function(s) at the path. If path is not specified, it defaults to "/". 3 4 Mounting a middleware at a path will cause the middleware function to be executed
whenever the base of the requested path matches the path.
摘自CSDN:Node.js开发入门—Express里的路由和中间件
摘自博客园:express 框架之 路由与中间件
以上就介绍了Nginx+Nodejs nodejs开发 express路由与中间件,包括了Nginx+Nodejs方面的内容,希望对Javascript教程有兴趣的朋友有所帮助。
posted on 2017-09-14 15:35 fanbird2008 阅读(78) 评论(0) 收藏 举报
浙公网安备 33010602011771号