@@ -30,8 +30,8 @@ fastify.register(require('@fastify/redis'), { host: '127.0.0.1' })
30
30
fastify .register (require (' @fastify/redis' ), { url: ' redis://127.0.0.1' , /* other redis options */ })
31
31
32
32
// OR with more options
33
- fastify .register (require (' @fastify/redis' ), {
34
- host: ' 127.0.0.1' ,
33
+ fastify .register (require (' @fastify/redis' ), {
34
+ host: ' 127.0.0.1' ,
35
35
password: ' ***' ,
36
36
port: 6379 , // Redis port
37
37
family: 4 // 4 (IPv4) or 6 (IPv6)
@@ -40,7 +40,7 @@ fastify.register(require('@fastify/redis'), {
40
40
41
41
### Accessing the Redis Client
42
42
43
- Once you have registered your plugin, you can access the Redis client via ` fastify.redis ` .
43
+ Once you have registered your plugin, you can access the Redis client via ` fastify.redis ` .
44
44
45
45
The client is automatically closed when the fastify instance is closed.
46
46
@@ -52,8 +52,8 @@ const fastifyRedis = require('@fastify/redis')
52
52
53
53
const fastify = Fastify ({ logger: true })
54
54
55
- fastify .register (fastifyRedis, {
56
- host: ' 127.0.0.1' ,
55
+ fastify .register (fastifyRedis, {
56
+ host: ' 127.0.0.1' ,
57
57
password: ' your strong password here' ,
58
58
port: 6379 , // Redis port
59
59
family: 4 // 4 (IPv4) or 6 (IPv6)
0 commit comments