Permalink
Browse files

[dist] Added examples

  • Loading branch information...
1 parent 4061451 commit 01ab760ef4b1628e9ce3727f6f8cfb50f1df93e0 @alejandro alejandro committed Mar 19, 2012
Showing with 29 additions and 0 deletions.
  1. +13 −0 examples/child.js
  2. +16 −0 examples/master.js
View
@@ -0,0 +1,13 @@
+require('watcher')({
+ maxMemory:25000 //25mb
+})
+
+
+/*
+
+ app.code
+
+
+
+
+ */
View
@@ -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.