UNPKG
pm2-intercom-p
Version:
latest (1.0.0)
1.0.0
Basic system to broadcast message to all other processes
pm2-intercom-p
/
test
/
fixtures
/
receiver.js
11 lines
(9 loc)
•
231 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
process.
on
(
'message'
,
function
(
packet
) {
if
(packet.
topic
==
'intercom:msg'
) {
console
.
log
(
'Received packet'
, packet.
data
); process.
send
({ topic :
'cmd:success'
, data : packet.
data
}); } });