title: Methods for calling APIs in one Nodejs app from another Nodejs app
body: <p>Our application will have a website and a mobile app both communicating to the same API backend. I have one Nodejs application for serving only APIs and a second Nodejs app serving html pages for the website. I am using Expressjs web framework for both of these apps.</p>
  
  <p>What are different methods to call APIs in one Nodejs from another Nodejs app? Additional information on when to use each method would be great. </p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Example,
  I have the following applications</p>
  
  <ul>
  <li>NodejsAPI (node &amp; express)</li>
  <li>NodejsWebsite (node &amp; express)</li>
  <li>MobileApp</li>
  </ul>
  
  <p>NodejsAPI will provide access to APIs for the MobileApp and the NodejsWebsite. MobileApp will access APIs over http. But I want to know what are the options for NodejsWebsite to call APIs in NodejsAPI app. From what I understand this will be inter process communication between the two processes. For .net applications such communications could be done using .net pipes, tcp communication etc. What are the equivalent methods for Nodejs applications on unix and linux platforms?</p>
  
  <p>Thinking from IPC perspective I found the following to be useful,<br>
  <a href="https://stackoverflow.com/questions/6463945/whats-the-most-efficient-node-js-inter-process-communication-library-method">What&#39;s the most efficient node.js inter-process communication library/method?</a> 
  <a href="https://www.npmjs.org/package/node-ipc" rel="nofollow noreferrer">https://www.npmjs.org/package/node-ipc</a></p>