@foundriesio/redis-client

4.3.1 • Public • Published

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 to localhost (string).
  • FIO_REDIS_PORT: the redis port, defaults to 6379 (number).
  • FIO_REDIS_PASSWORD: the redis password, not set by default (string).

Dependencies (5)

Dev Dependencies (10)

Package Sidebar

Install

npm i @foundriesio/redis-client

Weekly Downloads

13

Version

4.3.1

License

Apache-2.0

Unpacked Size

13.2 kB

Total Files

7

Last publish

Collaborators

  • stealthycoder
  • miloc