Created
November 11, 2012 02:26
-
-
Save fengmk2/4053403 to your computer and use it in GitHub Desktop.
http parse error
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 cluster = require('pm'); | |
var master = cluster.createMaster({ | |
pidfile : './aa' | |
}) | |
master.register( | |
'test', | |
'./worker.js', | |
{ | |
children:1, | |
listen:[55555], | |
trace_gc : false | |
} | |
); | |
master.dispatch(); | |
process.on('uncaughtException', function (err) { | |
console.error('uncaughtException %s', err.stack); | |
}); |
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 worker = require('pm').createWorker(); | |
var serv = http.createServer(function(req,res){ | |
res.end('hello'); | |
}); | |
worker.ready(function(sock){ | |
serv.emit('connection',sock); | |
}); | |
process.on('uncaughtException', function (err) { | |
console.error('uncaughtException %s', err.stack); | |
}); |
Author
fengmk2
commented
Nov 11, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment