image-steam-redis

1.1.3 • Public • Published

image-steam-redis

Redis client for Image Steam built on ioredis.

Default Options

By default, tuned specifically for fast-fail redis cluster cache. If you require high availability cache or persistence to disk, you'll want to update the options accordingly.

Options

import isteamRedis from 'image-steam-redis';

const redis = new isteamRedis({
  servers: [
    /* see servers */
  ],
  options: {
    /* see options */
  }
});
Param Info Link
servers Array of startup nodes See startupNodes
options Redis & Redis Cluster options See options

Usage

Example:

import isteam from 'image-steam';

const options = {
  storage: {
    app: {
      static: {
        driver: 'http',
        endpoint: 'https://github.com/asilvas/node-image-steam'
      }
    },
    cache: {
      driverPath: 'image-steam-redis',
      servers: [
        {
          port: 6379,
          host: '127.0.0.1'
        },
        {
          port: 6380,
          host: '127.0.0.1'
        },
        {
          port: 6381,
          host: '127.0.0.1'
        }
      ],
      options: {
        redisOptions: {
          keyPrefix: 'isteam::dev::'
        }
      }
    }
  }
}

http.createServer(new isteam.http.Connect(options).getHandler())
  .listen(13337, '127.0.0.1')
;

Readme

Keywords

none

Package Sidebar

Install

npm i image-steam-redis

Weekly Downloads

1

Version

1.1.3

License

MIT

Last publish

Collaborators

  • asilvas