README
vados-redis A plugin helps to manage redis for vados
Install npm i vados-redis -S Examples Typescript Config redis information
import { Redis } from 'vados-redis';
Redis({ host: 'localhost' })
Redis({ key: 'connection1', host: 'localhost' }) Use in service file
import { Redis, REDIS } from 'vados-redis';
export class ChartService { @REDIS() static redis: Redis;
@REDIS('connection1')
static redis1: Redis;
static async sendToRabbitmq(data: any = {}) {
ChartService.redis.set('key', data, 60); // stored data and expired time is 60 secs
}
}