Permalink
Browse files

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

  • Loading branch information...
1 parent 566ccbe commit 6b1be8dc78a128dfe63d27797f6f9737bad26575 @kriszyp kriszyp committed Nov 9, 2011
Showing with 7 additions and 11 deletions.
  1. +7 −11 start-node.js
View
@@ -1,17 +1,16 @@
// helpful for debugging
var settings = require("commonjs-utils/settings"),
- ws = require("websocket-server"),
- messageJson = require("./media/message/json"),
- multiNode = require("multi-node");
+ ws = require("node-websocket-server"),
+ messageJson = require("./media/message/json");
exports.start = function(jsgiApp, socketApp){
- var http = require("http").createServer(
+ var server = require("http").createServer(
require("jsgi-node").Listener(jsgiApp)
);
var port = settings.port || 8080;
- var nodes = multiNode.listen({port: port, nodes: settings.processes || 1}, http);
+ server.listen(port);
require("jsgi-node/ws-jsgi")(ws.createServer({
- server: http
+ server: server
}), function(request){
request.method = "POST";
var headers = request.headers;
@@ -21,12 +20,9 @@ exports.start = function(jsgiApp, socketApp){
return jsgiApp(request);
});
- nodes.addListener("node", function(stream){
- require("./pintura").app.addConnection(multiNode.frameStream(stream, true));
- });
console.log("Listening on port " + port);
// having a REPL is really helpful
- if(nodes.isMaster){
+// if(nodes.isMaster){
@neonstalwart

neonstalwart Nov 10, 2011

Owner

maybe...

if (require.main === module) {
  require("./util/repl").start();
}
require("./util/repl").start();
- }
+ //}
};

0 comments on commit 6b1be8d

Please sign in to comment.