We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ddab48 commit 6b6b0ddCopy full SHA for 6b6b0dd
1 file changed
docs/api/index.md
@@ -175,7 +175,21 @@ https.createServer(app.callback()).listen(3001);
175
176
## app.use(function)
177
178
- Add the given middleware function to this application. See [Middleware](https://github.com/koajs/koa/wiki#middleware) for
+ Add the given middleware function to this application.
179
+ `app.use()` returns `this`, so is chainable.
180
+```js
181
+app.use(someMiddleware)
182
+app.use(someOtherMiddleware)
183
+app.listen(3000)
184
+```
185
+ Is the same as
186
187
188
+ .use(someOtherMiddleware)
189
+ .listen(3000)
190
191
+
192
+ See [Middleware](https://github.com/koajs/koa/wiki#middleware) for
193
more information.
194
195
## app.keys=
0 commit comments