Redis client for Image Steam built on ioredis.
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.
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 |
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')
;