{"action":"opened","issue":{"url":"https://api.github.com/repos/expressjs/express/issues/3832","repository_url":"https://api.github.com/repos/expressjs/express","labels_url":"https://api.github.com/repos/expressjs/express/issues/3832/labels{/name}","comments_url":"https://api.github.com/repos/expressjs/express/issues/3832/comments","events_url":"https://api.github.com/repos/expressjs/express/issues/3832/events","html_url":"https://github.com/expressjs/express/issues/3832","id":391489830,"node_id":"MDU6SXNzdWUzOTE0ODk4MzA=","number":3832,"title":"Documentation: router vs middleware","user":{"login":"thernstig","id":30827238,"node_id":"MDQ6VXNlcjMwODI3MjM4","avatar_url":"https://avatars1.githubusercontent.com/u/30827238?v=4","gravatar_id":"","url":"https://api.github.com/users/thernstig","html_url":"https://github.com/thernstig","followers_url":"https://api.github.com/users/thernstig/followers","following_url":"https://api.github.com/users/thernstig/following{/other_user}","gists_url":"https://api.github.com/users/thernstig/gists{/gist_id}","starred_url":"https://api.github.com/users/thernstig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thernstig/subscriptions","organizations_url":"https://api.github.com/users/thernstig/orgs","repos_url":"https://api.github.com/users/thernstig/repos","events_url":"https://api.github.com/users/thernstig/events{/privacy}","received_events_url":"https://api.github.com/users/thernstig/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-16T17:52:51Z","updated_at":"2018-12-16T17:52:51Z","closed_at":null,"author_association":"NONE","body":"Having recently read all the documentation under \"Getting started\" and \"Guide\" I've found that the concept of routing and middleware is somewhat ambigous.\r\n\r\nThe [Getting started -> Basic routing](https://expressjs.com/en/starter/basic-routing.html) page describes:\r\n\r\n> Route definition takes the following structure:  \r\n`app.METHOD(PATH, HANDLER)`\r\n\r\nThe [Guide -> Writing middleware](https://expressjs.com/en/guide/writing-middleware.html) guide explains exactly the same thing but now mentions it as:\r\n\r\n> The following figure shows the **elements of a middleware function call**:\r\n\r\nOne gets the _feeling_ that a middleware is actually used with app.use() or router.use(). I am unsure how to improve the documentation as I, by reading this guides, did not get a clear definition of these concepts."}}
{"actor":{"display_login":"thernstig"}}