The following is the node.js documentation for branching processes and child processes in node.
http://nodejs.org/api/child_process.html
It looks like you could do something like this.
var child = require('child_process').fork('child.js'); child.on("message", function(){});
And in this case, you will need a child.js file.
source share