This tutorial does not assume any framework or specific setup.
Install using NPM:
npm install redibox --save
Import into your project:
import RB from 'redibox';
You'll now want to create a single instance of RediBox, usually during or before your application bootstrap process.
const RediBox = new RB();
Check out the configuration page for a full list of options.
Using the RediBox instance, you're now able to listen for the broadcasted events ready & error.
ready
error
Fired after a successful Redis connection and once all RediBox Hooks have been loaded.
RediBox.on('ready' () => { console.log('Redis is connected'); });
Fired if the connection to Redis fails or any Hooks fail to load.
RediBox.on('ready' error => { console.error('RediBox failed to load', error); });
Configuration
There was an error while loading. Please reload this page.