Permalink
Browse files

[refactor] express support

  • Loading branch information...
1 parent 14eb1e2 commit 48c8aac5c69bff6d818e9e1da03bf2f8c3d4fe4a @alejandro alejandro committed Mar 24, 2012
Showing with 6 additions and 3 deletions.
  1. +2 −1 examples/child.js
  2. +4 −2 lib/watcher.js
View
@@ -1,7 +1,8 @@
(new (require('../lib/watcher'))({
host:'localhost',
user:'alejandromg',
- password:'34141231'
+ password:'34141231',
+ path:'/env/audit'
})).emitter({
maxMemory:25, //25mb,
sizeSpace:25,
View
@@ -19,7 +19,7 @@ var Watcher = function (cfg) {
this.endPoint = endPoint = {
host: cfg.host||'localhost',
port: cfg.port || 4001,
- path: cfg.path || '/',
+ path: cfg.path || '/watcher/audit',
method: cfg.method ||'PUT',
headers :{
"Proxy-Authorization": auth,
@@ -78,7 +78,9 @@ Watcher.prototype.emitter = function(options){
code : code,
msg : msg
}
- var callout = http.request(endPoint);
+ var callout = http.request(endPoint,function(response){
+ process.exit(0)
+ });
callout.on('end', function(){
process.exit(0);
});

0 comments on commit 48c8aac

Please sign in to comment.