File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,8 @@ Connectが登録された_middleware_をどう処理するかというと、
8888
8989つまり、処理的には以下のようにstackを先頭から一個づつ取り出して、処理していくという方法が取られています。
9090
91+ Connectの行っている処理を抽象的なコードで書くと以下のような形となっています。
92+
9193``` js
9294let req = " ..." ,
9395 res = " ..." ;
@@ -103,12 +105,11 @@ next();// 初回
103105このような_middleware_を繋げた形を_middleware stack_と呼ぶことがあります。
104106
105107_ middleware stack_で構成されるHTTPサーバとして、PythonのWSGI MiddlewareやRubyのRackなどがあります。
106-
107108ConnectはRackと同じく` use ` で_middleware_を指定することからも分かりますが、
108109Rackを参考にして実装されています。
109110
110111- [ Ruby - Rack解説 - Rackの構造とRack DSL - Qiita] ( http://qiita.com/higuma/items/838f4f58bc4a0645950a#2-5 " Ruby - Rack解説 - Rackの構造とRack DSL - Qiita ")
111112
112- 次に、この_middleware stack_の具体的な実装を書きながら見て行きましょう 。
113+ 次は、先ほど抽象的なコードとなっていたものを、具体的な実装にしていきます 。
113114
114115## 実装してみよう
You can’t perform that action at this time.
0 commit comments