Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Grondin committed Jul 16, 2019
1 parent c7575a0 commit 2a9c2ce
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -811,12 +811,14 @@ const limiter = new Bottleneck({

**Note:** If you are seeing a runtime error due to the `require()` function not being able to load `redis`/`ioredis`, then directly pass the module as the `Redis` option. Example:
```js
import Redis from 'ioredis'
import Redis from "ioredis"

const limiter = new Bottleneck({
id: "my-super-app",
datastore: "ioredis",
clientOptions: { host: '12.34.56.78', port: 6379 },
Redis
})
});
```
Unfortunately, this is a side effect of having to disable inlining, which is necessary to make Bottleneck easy to use in the browser.

Expand Down

0 comments on commit 2a9c2ce

Please sign in to comment.