nodejs-redistool

1.3.0 • Public • Published

nodejs-redistool

modejs redis tool

Install

> npm install nodejs-redistool --save-dev

Usage

app.js

// app.js
const { init, mq } = require('nodejs-redistool');
const topic = "mq:key";
// config redis mq
init({
    host: "127.0.0.1",
    password: "pass",
    port: 6379,
    db: 2
});
// sub message
mq.sub(topic, (msg) => {
    // handle msg
}, "*/2 * * * * *");
// pub message
mq.pub(topic, ...msgs);

Dependents (0)

Package Sidebar

Install

npm i nodejs-redistool

Weekly Downloads

2

Version

1.3.0

License

UNLICENSED

Unpacked Size

14.2 kB

Total Files

6

Last publish

Collaborators

  • liangmayong