Closed knoxmic closed 13 years ago
Hi, I want to use http://learnboost.github.com/cluster/ on my server, but with the demo code on github, I get this error message:
events.js:23 throw arguments[1]; // Unhandled 'error' event ^ Error: ENOTSUP, Operation not supported at Server._doListen (net.js:1062:5) at net.js:1010:16
NodeJS version is v0.4.2.
app.js:
var http = require('http'); module.exports = http.createServer(function(req, res){ console.log('%s %s', req.method, req.url); var body = 'Hello World'; res.writeHead(200, { 'Content-Length': body.length }); res.end(body); });
server.js:
var cluster = require('cluster') , app = require('./app'); cluster(app) .use(cluster.logger('logs')) .use(cluster.stats()) .use(cluster.pidfiles('pids')) .use(cluster.cli()) .use(cluster.repl(8888)) .listen(3000);
Can anybody help?
Shell restarted, problem gone...
Hi, I want to use http://learnboost.github.com/cluster/ on my server, but with the demo code on github, I get this error message:
NodeJS version is v0.4.2.
app.js:
server.js:
Can anybody help?