This is a common problem. If you have two applications written in two different languages ββor running on two different machines or whatever the reason they might be separated, they can still communicate.
You start one server on one machine and another on another. Servers are designed to serve things, so their main function is to listen on the port and respond to incoming requests. But they are not limited to this. They can also send requests! There is no reason why a server cannot be a client at the same time.
Basically, you need to add client functions to the server so that it can fulfill requests to other servers. It is much easier to do this in the context of web development, because we already have well-known REST (and most languages ββhave libraries for creating and analyzing REST requests and responses).
Also keep in mind that you need to implement some security features while doing this. For example, if your Node.JS server is serving something only for your ASP.NET server, you can restrict this Node.JS server, so it will not host this content on the entire Internet.
source share