sails-hook-redibox

1.1.2 • Public • Published

sails-hook-redibox

Build Status Downloads Downloads npm version dependencies dev dependencies License

Sails hook for RediBox - exposes any installed hooks as SailsJS services.

Getting Started

Install it via npm:

npm install sails-hook-redibox --save

Sails config can be placed in config/hooks/redibox.js or config/redibox.js.

Configuration Example

export default {
  hooks: {
    redibox: {
      redis: {
        prefix: 'my-project',
        cluster: true,
        clusterScaleReads: false,
        subscriber: true,
        publisher: true,
        hosts: [
          {host: 'localhost', port: 30001},
          {host: 'localhost', port: 30002},
          {host: 'localhost', port: 30003},
          {host: 'localhost', port: 30004},
          {host: 'localhost', port: 30005},
          {host: 'localhost', port: 30006}
        ]
      },
      job: {
        prefix: 'job',
        enabled: true,
        queues: [
          // example queues
          {name: 'my-queue-1', concurrency: 35},
          {name: 'my-queue-2', concurrency: 10},
          {name: 'my-queue-3', concurrency: 25}
        ]
      },
      cache: {
        enabled: true,
        prefix: 'cache',
        defaultTTL: 600
      },
      log: {
        level: 'warn'
      }
    }
  }
};

License

MIT

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.21latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.21
1.1.11
1.1.01
1.0.01
0.1.131
0.1.121
0.1.111
0.1.101
0.1.91
0.1.01

Package Sidebar

Install

npm i sails-hook-redibox

Weekly Downloads

10

Version

1.1.2

License

MIT

Last publish

Collaborators

  • salakar