UNPKG

blue-fish-redis

Version:
25 lines (24 loc) 766 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RedisBin = void 0; const coa_echo_1 = require("coa-echo"); const typings_1 = require("./typings"); class RedisBin { constructor(config) { this.config = config; this.io = new typings_1.Redis({ port: config.port, host: config.host, password: config.password, db: config.db, lazyConnect: true, }); config.trace && this.io.monitor((_err, monitor) => { monitor.on('monitor', (time, args, source, database) => { coa_echo_1.echo.grey('* Redis: [%s] %s', database, args); }); }); } } exports.RedisBin = RedisBin;