title: How to load angular 2 files within express sub-app
body: <p>I have an node application using express. I used express-generator to generate a default express setup. </p>
  
  <p>I created two sub-applications that I will call "ang" and "admin" (also using the express-generator). These sub-applications are contained within another express application I will call "host".</p>
  
  <p>"Ang"- Handles an angular2 application as well as its respective api (api made with express)</p>
  
  <p>"Admin"- This allows the site owners to add new content to database that the api interfaces with.</p>
  
  <p>This works well on my local dev environment, but when I push this to Heroku certain modules are not being installed (ie, the "admin" app is missing modules specific to it) and the build fails.</p>
  
  <p>After copying relevant dependencies from the sub-apps package.jsons (from both express sub apps as well as the ang2 package.json) I was able to run the admin portion of the website, but was unable to run "ang" as it would encounter 404 errors as it searched for node_modules.</p>
  
  <p>"host app.js"</p>
  
  <pre><code>/*required modules*/
  var app = express();
  
  /*Boths paths reference different sub apps*/
  var ang = require('./path/to/app.js');
  var admin = require('./path/to/app.js');
  
  /*Routes each app uses*/
  app.use('/base', admin);
  app.use('/', ang);
  
  module.exports = app;
  </code></pre>
  
  <p>How do I route to the node-modules contained within the "host" app?</p>