Created
August 11, 2011 07:04
-
-
Save samyakbhuta/1139060 to your computer and use it in GitHub Desktop.
A very basic cluster.js example, giving "Error in unix_dgram bind of .." and "Error: stream not writable"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require("http"); | |
var cluster = require("cluster"); | |
anHTTPServer = http.createServer(function (req,res){ | |
res.write("Hello"); | |
res.end(); | |
}); | |
//anHTTPServer.listen(3000); | |
cluster(anHTTPServer) | |
.use(cluster.logger('logs')) | |
.use(cluster.stats()) | |
.use(cluster.pidfiles('pids')) | |
.use(cluster.cli()) | |
.use(cluster.repl(8888)) | |
.listen(3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
weird!!