https://cloud.tencent.com/developer/article/1014187
这篇讲的很好
https://blog.risingstack.com/your-first-node-js-http-server/
这篇讲了中间件的好就好在:
- The first middleware just logs the headers and instantly calls the next one.
- The seconds one adds an extra property to it - this is one of the most powerful features of the middleware pattern. Your middlewares can append extra data to the request object that downstream middlewares can read/alter.