Hello fellows!
Is there a way to send the request to the children?
I mean:
var http = require('http');
var child = require('child_process').fork(__dirname + '/child.js');
http.createServer(function (req, res) {
child.send('response', res);
}).listen(1337, '127.0.0.1');
And on the child.js
process.on('message', function(message, res){
res.writeHead(200, {'Content-Type': 'application/json'});
res.end('{"hello" : "world"}');
});
Thanks!
--
Att,
Alan Hoffmeister
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en