Skip to content

Commit a9111de

Browse files
committed
Merge branch 'source' into part-4-node-test-spanish
2 parents 7a0cadb + 0f3befb commit a9111de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/3/en/part3a.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ app.use(requestLogger)
982982

983983
Remember, middleware functions are called in the order that they're encountered by the JavaScript engine. Notice that _json-parser_ is listed before _requestLogger_ , because otherwise <i>request.body</i> will not be initialized when the logger is executed!
984984

985-
Middleware functions have to be used before routes when we want them to be executed by the route event handlers. Sometimes, we want to use middleware functions after routes. We do this this when the middleware functions are only called if no route handles process the HTTP request.
985+
Middleware functions have to be used before routes when we want them to be executed by the route event handlers. Sometimes, we want to use middleware functions after routes. We do this when the middleware functions are only called if no route handler processes the HTTP request.
986986

987987
Let's add the following middleware after our routes. This middleware will be used for catching requests made to non-existent routes. For these requests, the middleware will return an error message in the JSON format.
988988

0 commit comments

Comments
 (0)