Skip to content

Commit

Permalink
[dist] Added examples
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandro committed Mar 19, 2012
1 parent 4061451 commit 01ab760
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
13 changes: 13 additions & 0 deletions examples/child.js
@@ -0,0 +1,13 @@
require('watcher')({
maxMemory:25000 //25mb
})


/*
app.code
*/
16 changes: 16 additions & 0 deletions examples/master.js
@@ -0,0 +1,16 @@
var bolt = require('bolt');
var restart = require('lib/app').restart;
var mesh = new bolt.Node({
delimiter:'::',
host: options.host || 'localhost',
port: options.port || 6379,
auth: options.auth || ''
});
mesh.on('nodester::dieing',function(app){
var proxytable =require('/path/to/proxy/table.json')
for (subdomain in proxytable){
if (proxytable[subdomain]===app.port){
restart(proxytable[subdomain]);
}
}
})

0 comments on commit 01ab760

Please sign in to comment.