Skip to content

Commit e833a30

Browse files
committed
Fixed docs
1 parent 80a834e commit e833a30

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ const Timeout = require('koa-better-timeout');
4343

4444
// ...
4545

46-
app.use(new Timeout().middleware);
46+
const timeout = new Timeout();
47+
app.use(timeout.middleware.bind(timeout));
4748
```
4849

4950
> Advanced middleware usage (e.g. using [Lad][] and its [@ladjs/i18n][ladjs-i18n] middleware) with translated response message:

0 commit comments

Comments
 (0)