Our application will have a website and a mobile application that will communicate with the same API. I have one Nodejs application for serving only APIs and a second Nodejs application serving html pages for a website. I am using Expressjs for both of these applications.
What are the different methods of calling an API in one Nodejs from another Nodejs application? More information on when to use each method would be great.
EDIT:
Example, I have the following applications
- NodejsAPI (node ββand express)
- NodejsWebsite (node ββand express)
- Mobileapp
NodejsAPI will provide API access for MobileApp and NodejsWebsite. MobileApp will access the API via http. But I want to know what options for NodejsWebsite to call the API in the NodejsAPI application. As far as I understand, this will be interprocess communication between two processes. For .net applications, this communication can be done using .net channels, tcp communication, etc. What are the equivalent methods for Nodejs applications on unix and linux platforms?
Thoughts from an IPC perspective I found the following helpful,
What is the most efficient library / method for exchanging data between various node.js technologies? https://www.npmjs.org/package/node-ipc
maulik13
source share