0. install redis library for node npm install redis 1.node command example > var _redis = require("redis")undefined> var redis = _redis.createClient({auth_pass :"123456"}); //auth to redis with password 1234undefined> redis.s…
最近项目使用redis,对publish 和 subscribe的使用进行了了解,并进行了封装. var config = require('../config/config'); var log = require("./loghelp"); var redis = require("redis"); function initialclient(param) { var option={ host: config.redis.host, port: config…