官术网_书友最值得收藏!

Connecting middleware

Middleware refers to reusable components that can be plugged into an Express application. Middleware consists of functions that handle HTTP requests, such as the one we would pass to Node's native http.createServer function. A middleware component can add features by manipulating the request and response objects and then send the response to the client or pass control to the following middleware in the stack. There are a lot of middleware libraries that are compatible with Express, the most popular ones being those that were bundled with it but now live in separate modules (https://github.com/senchalabs/connect#middleware).

Web applications have to deal with a lot of things, such as managing cookies and sessions, handling file uploads, or serving static files. Middleware libraries can address these problems.

主站蜘蛛池模板: 兴安盟| 富阳市| 台北市| 满洲里市| 梧州市| 华宁县| 阿拉善左旗| 清水河县| 方正县| 江陵县| 台江县| 汉中市| 张北县| 秦皇岛市| 台州市| 浮梁县| 新兴县| 崇信县| 丰原市| 将乐县| 曲松县| 南岸区| 建瓯市| 凌海市| 会宁县| 安泽县| 合水县| 礼泉县| 东安县| 南丰县| 彰化县| 嘉祥县| 峨山| 隆回县| 房山区| 交城县| 滨州市| 合川市| 汽车| 东明县| 宁陵县|