Reputation: 39
I'm working with two independent nodejs processes, the first one is an server over TCP, and the second is an express app that listen for HTTP requests. My problem is how can i handle the communication between those two processes?
Upvotes: 0
Views: 818
Reputation: 38543
Plenty of options:
launch one process from another using child_process and communicate using stdin/stdout
have your express app also open a TCP connection to your TCP server (on a different port than the one already in use), and communicate via tcp/ip
I think the list could go on.
Upvotes: 2