@foundriesio/redis-client
v4.4.6
Published
A redis client for *.foundries.io web apps
Downloads
521
Readme
A redis client wrapper, used on *.foundries.io web applications.
It is based on the redis nodejs client.
How to use it
import redisClient from '@foundriesio/redis-client';
return redisClient();
Configuration
Via a JSON file with the following structure:
{
"redis": {
"host": "The redis host, defaults to localhost",
"port": "The redis port, defaults to 6379",
"password": "The redis access password"
}
}
The JSON file can be defined using the FIO_CONFIG_FILE
environment variable:
export FIO_CONFIG_FILE="/path/to/config.json"
Or using the following environment variable:
FIO_REDIS_HOST
: the redis host, defaults tolocalhost
(string).FIO_REDIS_PORT
: the redis port, defaults to6379
(number).FIO_REDIS_PASSWORD
: the redis password, not set by default (string).