Skip to content
This repository
Browse code

Remove starting with multi-node since one can use 0.6's clustering now

  • Loading branch information...
commit 6b1be8dc78a128dfe63d27797f6f9737bad26575 1 parent 566ccbe
Kris Zyp authored November 09, 2011

Showing 1 changed file with 7 additions and 11 deletions. Show diff stats Hide diff stats

  1. 18  start-node.js
18  start-node.js
... ...
@@ -1,17 +1,16 @@
1 1
 // helpful for debugging
2 2
 var settings = require("commonjs-utils/settings"),
3  
-	ws = require("websocket-server"),
4  
-	messageJson = require("./media/message/json"),
5  
-	multiNode = require("multi-node");
  3
+	ws = require("node-websocket-server"),
  4
+	messageJson = require("./media/message/json");
6 5
 
7 6
 exports.start = function(jsgiApp, socketApp){
8  
-	var http = require("http").createServer(
  7
+	var server = require("http").createServer(
9 8
 			require("jsgi-node").Listener(jsgiApp)
10 9
 		);
11 10
 	var port = settings.port || 8080;
12  
-	var nodes = multiNode.listen({port: port, nodes: settings.processes || 1}, http);
  11
+	server.listen(port);
13 12
 	require("jsgi-node/ws-jsgi")(ws.createServer({
14  
-		server: http
  13
+		server: server
15 14
 	}), function(request){
16 15
 		request.method = "POST";
17 16
 		var headers = request.headers;
@@ -21,12 +20,9 @@ exports.start = function(jsgiApp, socketApp){
21 20
 		return jsgiApp(request);
22 21
 	});
23 22
 	
24  
-	nodes.addListener("node", function(stream){
25  
-		require("./pintura").app.addConnection(multiNode.frameStream(stream, true));
26  
-	});
27 23
 	console.log("Listening on port " + port);
28 24
 	// having a REPL is really helpful
29  
-	if(nodes.isMaster){
  25
+//	if(nodes.isMaster){
30 26
 		require("./util/repl").start();
31  
-	}
  27
+	//}
32 28
 };

0 notes on commit 6b1be8d

Ben Hockey

maybe...

if (require.main === module) {
  require("./util/repl").start();
}
Please sign in to comment.
Something went wrong with that request. Please try again.