Skip to content

asilvas/image-steam-redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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')
;

Releases

No releases published

Packages

No packages published