childport
Launch child processes for services that bind to a specified port.
npm install childport
// parent.jsvar request = childport = ; { } var child = childportchildchildstderr
// child.jsvar http = childport = ; childport
childport.listen(server)
This method is to be used in child process scripts. It will parse the specified port and call listen on the server it sent and, on success, let the parent process know it has finish so that it can resolve the specified callback.
Returns the server it was passed for easy chaining.
childport.child_process(port, cb)
&& childport.cp(port, cb)
Returns a mocked child_process
module that will launch the process with identifying information about the port to bind to.
childport.cp(port, cb).spawn
Identical to core's child_process.spawn
.
childport.cp(port, cb).fork
Identical to core's child_process.fork
.
childport.cp(port, cb).exec
Identical to core's child_process.exec
.
childport.cp(port, cb).execFile
Identical to core's child_process.execFile
.