title: NodeJS on server thats running multiple sites
body: <p>I'm new to publishing website.</p>
  
  <p>So my situation is this, in our school, we have a website, then I've done some project and we want to merge it to our school website. </p>
  
  <pre><code>www.schoolwebsite.com/myproject
  </code></pre>
  
  <p>So we decided to make it something like that. They're running WordPress website, and my project is built on using MEAN technology (not the one on mean.io).
  So I transferred all my project files into their FileZilla thing. Then on the server, we installed NodeJS and MongoDB.</p>
  
  <p>On my server file (index.js), I'm listening to port 3000, so my angularjs will talk to the www.schoolwebsite.com:3000 to get the API's. I was able to get it to talk, but the problem is, there is also another website that's been hosted on the same server:</p>
  
  <pre><code>Server --&gt; 2 websites (www.schoolwebsite.com and www.somewebsite.com) 
  </code></pre>
  
  <p>Both of them have 3000 port open (well because they're on the same server).</p>
  
  <pre><code>www.schoolwebsite.com:3000
  www.somewebsite.com:3000
  123.456.789.123:3000 &lt;-- Example Server IP
  </code></pre>
  
  <p>So the guy showed me that this is whats happening when I run the "node index.js" it listens to port 3000.</p>
  
  <p>My question is, is there a way in NodeJS to only open the port 3000 on www.schoolwebsite.com?</p>
  
  <p>Is this a security issue? Having both port 3000 on the sites? What's the best practice on this one?</p>