Skip to content

Commit

Permalink
Modify readme and start.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
killme2008 committed Nov 22, 2012
1 parent ca71b67 commit 86f29f8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ First,you must install dependencies with npm
Then edit app.js to configure your zk hosts

var zkclient = new ZkClient("localhost:2181");
Or you can pass it by enviroment variable:

export ZK_HOST="localhost:2181"
in `start.sh`.

And edit user.json to configure your administrator account:

Expand Down
2 changes: 1 addition & 1 deletion start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LOGFILE=$(dirname $0)/logs/node-zk-browser.log

export ZK_HOST="localhost:2181"
nohup node $(dirname $0)/app.js 2>&1 >>$LOGFILE &

2 changes: 1 addition & 1 deletion zk.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var ZK = require ("zookeeper").ZooKeeper;

function new_zk(hosts,zkclient){
var zk = new ZK();
zk.init ({connect:hosts, timeout:10000, debug_level:ZK.ZOO_LOG_LEVEL_WARNING, host_order_deterministic:false});
zk.init ({connect:hosts, timeout:20000, debug_level:ZK.ZOO_LOG_LEVEL_WARNING, host_order_deterministic:false});
zk.on (ZK.on_connected, function (zkk) {
console.log ("zk session established, id=%s", zkk.client_id);
});
Expand Down

0 comments on commit 86f29f8

Please sign in to comment.