title: Running multiple Node (Express) apps on same port
body: <p>I have multiple Node applications (build on Express framework).</p>
  
  <p>Now I have placed them like this -</p>
  
  <ul>
  <li><code>/var/www/app1</code></li>
  <li><code>/var/www/app2</code></li>
  <li><code>/var/www/app3</code></li>
  </ul>
  
  <p>Now I want to run these 3 apps on the same port (say 8080). Is that possible ?</p>
  
  <p>One thing to note is that, Each app has common routes like these -</p>
  
  <ul>
  <li><code>app.get('/', func...);</code></li>
  <li><code>app.get('/about', func...);</code></li>
  <li><code>app.post('/foo', func...);</code></li>
  <li><code>app.post('/bar', func...);</code></li>
  </ul>
  
  <p>Basically I want to do it like you can do with Apache/PHP setup.</p>
  
  <p>So with a LAMP stack when you have -</p>
  
  <ul>
  <li><code>/var/www/app1</code></li>
  <li><code>/var/www/app2</code></li>
  <li><code>/var/www/app3</code></li>
  </ul>
  
  <p>You can easily access them as different apps from -</p>
  
  <ul>
  <li><code>localhost/app1</code></li>
  <li><code>localhost/app2</code></li>
  <li><code>localhost/app3</code></li>
  </ul>