app-context-redis
Redis initializer for app-context
Usage
This initializer can be auto-installed by using it in your context file.
This initializer will attach the configured connections to APP.redis
.
module { this // attach a connection to APP.redis - use the value at APP.config.redis as the connection string // attach a connection to APP.redis // create 2 connections and attach them as an object to APP.redis // this will create APP.redis.cache and APP.redis.sessions // you can also pass options to each connection };
Connection Configurations
Each connection can be configured with either a connection string (like redis://localhost/2
) or
with an object. The object will be passed through to redis.createClient
and can consist of any options
from the redis client. There is a special url
option that this initializer requires.