node-ipc-promise
A Node.js tool for ipc in promise style with following features
- returns promises
- not affecting original process event emitter
this module requires Promise and WeakMap, you should use polyfill or shim if they are not supported natively
Installation
npm install node-ipc-promise
Basic Usage
Parent process
var child_process = ;var child = child_process; var IPC = ;var ipc = ; ipc; ipc;
Child process
var IPC = ;var ipc = ; // prevent process from exiting immediately; ipc;
the output may look like
Hi there.
Hi, I am child.
Hi, I am parent.
it can also be coded in es6 style with es7 async/await, which may output similar results
Parent process
;let child = ; ;let ipc = ; ipc; async { let greeting = await ipc; console;};
Child process
;let ipc = ; // prevent process from exiting immediately; ipc;
APIs
ipc;
ipc;
ipc;
ipc;
ipc;