This is a plugin to share a common redis connection across the whole Hapi server.
This version is intended for use with hapi v8.x.x
If you are looking for a version that works with hapi v7.x.x then please use version 1.x.x
As of 3.x.x it is now possible to register this plugin multiple times
As of 4.x.x it is now possible to supply a connection string as the option
As of 4.x.x redis is now a peer dependency (0.12.x) to allow users more freedom with redis versions
As of 5.x.x we've scrapped redis as a peer deps
With 6.x.x the options object has changed it's signature
Registering the plugin
Options:
redisLibrary: passing in a redis module to override the one bundled with this module. optional.
connection: an object or string that is passed through to basic-redis-factory as the 2nd argument. The relevant part of the docs are reproduced here for ease of reference:
connection can either be a url connection string (i.e redis://user:password@127.0.0.1:6379) or an object.
if connection is an object then the factory will look for the following keys on the object
and fallback to defaults for any missing values (host: 127.0.01, port: 6379, no authentication).
url : a url connection string.
host: the host to connect to.
port: the port to connect to.
password: the password to authenticate with, if not supplied then no auth will applied.