Permalink
Browse files

Merge https://github.com/baudehlo/multi-node

Conflicts:
	lib/multi-node.js
  • Loading branch information...
2 parents ca5b70d + 4e5e2be commit 6d807ba23100ab868a440486e9ff8c8ff0ba403b @kriszyp committed Mar 15, 2011
Showing with 3 additions and 2 deletions.
  1. +2 −1 README.md
  2. +1 −1 lib/multi-node.js
View
@@ -15,6 +15,7 @@ server. The options argument may have the following properties:
* port - specifying the port number to listen on (defaults to 80)
* nodes - specifying the number of node processes (defaults to 1)
+* host - address to listen on (defaults to 0.0.0.0)
* masterListen - Indicate whether the master process should listen and handle
requests as well (on by default, but you may want to turn this off if you processes are
prone to dying and you want to reliably utilize auto-restart of processes), defaults to true
@@ -90,4 +91,4 @@ Licensing
Multi-node is part of the Persevere project, and therefore is licensed under the
AFL or BSD license. The Persevere project is administered under the Dojo foundation,
and all contributions require a Dojo CLA.
-
+
View
@@ -35,7 +35,7 @@ exports.listen = function(options, server){
emitter.id = "master";
var children = [],
tcpDescriptor = netBinding.socket("tcp4");
- netBinding.bind(tcpDescriptor, options.port || 80, options.host);
+ netBinding.bind(tcpDescriptor, options.port || 80, options.host || '0.0.0.0');
netBinding.listen(tcpDescriptor, 128);
var masterListen = options.masterListen !== false;
var numChildren = (options.nodes || 1) - (masterListen ? 1 : 0);

0 comments on commit 6d807ba

Please sign in to comment.