You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+42-7Lines changed: 42 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,26 +7,59 @@
7
7
8
8
Fastify Redis connection plugin; with this you can share the same Redis connection in every part of your server.
9
9
10
-
Under the hood [ioredis](https://github.com/luin/ioredis) is used as client, the ``options`` that you pass to `register` will be passed to the Redis client.
11
-
12
10
## Install
11
+
13
12
```
14
13
npm i fastify-redis --save
15
14
```
15
+
16
16
## Usage
17
+
17
18
Add it to your project with `register` and you are done!
18
-
You can access the *Redis* client via `fastify.redis`. The client is
19
-
automatically closed when the fastify instance is closed.
20
19
21
-
```js
22
-
'use strict'
20
+
### Create a new Redis Client
23
21
22
+
Under the hood [ioredis](https://github.com/luin/ioredis) is used as client, the ``options`` that you pass to `register` will be passed to the Redis client.
0 commit comments