Skip to content

Commit

Permalink
docs: showcase how to use Redis constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats authored Apr 25, 2024
1 parent 26dcda9 commit e7c09b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/redis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ const keyv = new Keyv({
})
```

Or you can reuse a previously declared Redis instance:
Or you can reuse a previously declared `Redis` instance:

```js
const KeyvRedis = require('@keyvhq/redis')
const Keyv = require('@keyvhq/core')
const Redis = require('ioredis')

const { Redis } = KeyvRedis

const redis = new Redis('redis://user:pass@localhost:6379')
const keyv = new Keyv({ store: new KeyvRedis(redis) })
Expand Down

0 comments on commit e7c09b5

Please sign in to comment.