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 @@ -36,12 +36,13 @@ Echoサーバでは `req.pipe(res);` という形でリクエストをそのま
3636
3737それぞれの処理を_middleware_としてファイルを分けて実装し、` app.use(middleware) ` で処理を追加しています。
3838
39- [ import errorHandler.js] ( ../../src/connect/errorHandler.js )
4039
4140[ import nosniff.js] ( ../../src/connect/nosniff.js )
4241
4342[ import hello.js] ( ../../src/connect/hello.js )
4443
44+ [ import errorHandler.js] ( ../../src/connect/errorHandler.js )
45+
4546[ import connect-example.js] ( ../../src/connect/connect-example.js )
4647
4748基本的にどの_middleware_も` app.use(middleware) ` という形で拡張でき、
@@ -66,9 +67,9 @@ Connectが登録された_middleware_をどう処理するかというと、
6667
6768上記の例だと以下の順番で_middleware_が呼び出されることになります。
6869
69- - errorHandler
7070- nosniff
7171- hello
72+ - errorHandler
7273
7374エラーハンドリングの_middleware_は処理中にエラーが起きた時のみ呼ばれます。
7475
You can’t perform that action at this time.
0 commit comments