npm install process-events --save
Process events is a library from Node.js that can run custom events via forked processes and return there response as promise. This is useful when you have long running tasks and you don't what to lock your main application thread.
Main node process
var processEvents = ;var childProcess = processEvents;childProcess;
var processChild = ;// bind to custom eventprocessChild;
Main process API.
var processEvent = processEvent;var worker = ;
||Returns child process connection state.|
||Sends message to child process.|
||Close child process. Node that if you don't close your process node script will continue to run forever or until process gets killed.|
||Will reopen child process after it was killed.|
Child process API.
var processChild = processChild;
||Bind callback to child process worker. Callback can return