Skip to content

Commit

Permalink
Upgrade to express.js 3
Browse files Browse the repository at this point in the history
  • Loading branch information
killme2008 committed Nov 22, 2012
1 parent 86f29f8 commit 350abcf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var port=3000;
var host = process.env.ZK_HOST || 'localhost:2181'
var zkclient = new ZkClient(host);
var users = JSON.parse(fs.readFileSync(path.join(__dirname,'user.json'), 'utf8'));
var app = module.exports = express.createServer();
var app = express();

process.on('uncaughtException', function (err) {
console.error('Caught exception: ' + err);
Expand Down
4 changes: 4 additions & 0 deletions views/tree.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
<script type="text/javascript" src="jquery.tree.js"></script>
<script type="text/javascript" language="javascript">
<!--
String.prototype.endsWith = function(suffix) {
return this.indexOf(suffix, this.length - suffix.length) !== -1;
};
$(function () {
$.ajaxSetup({cache:false});
$("#zkTree").tree({
Expand Down Expand Up @@ -42,6 +45,7 @@
});
function searchnodes(){
var searchPath=$('#search_path').val();
window.location.href='/node-zk/tree?path='+searchPath;
$(parent.document.body).find('#content').attr('src', "/node-zk/get?path="+searchPath);
}
Expand Down

0 comments on commit 350abcf

Please sign in to comment.