Name Last Update
.gitignore Loading commit data...
README.md Loading commit data...
index.js Loading commit data...
package.json Loading commit data...
yarn.lock Loading commit data...

Yoho zookeeper Watcher Usage

使用方法

  • npm i yoho-zookeeper --save
  • config文件中配置zookeeperServer地址,目前测试机168上已装,可以增加配置为 zookeeperServer: 192.168.102.168:2188
  • node入口文件app.js中加入初始化代码 ```javascript

require('yoho-zookeeper')(config.zookeeperServer, host, app.locals);

//参数说明: // server [string] 需要连接的zookeeper服务器 // host [string] application type (为"pc"/"wap" ) // memory [Object] 内存注入宿主,考虑到渲染,一般为app.locals

* 修改业务代码
```html
{{#if @root.common.disMyYohoHover}}
...your cart count html
{{/if}}

或者

if (req.app.locals.disSearchAssociation) {
    api.get('...')
} else {
    res.send({});
}