title: Sub domains in nodejs
body: <p>How can I handle subdomains request by nodejs?</p>
  
  <p>for example the following code echo <strong>test</strong> in console for any request on <strong><a href="http://localhost:9876/[anything]" rel="nofollow">http://localhost:9876/[anything]</a></strong> :</p>
  
  <pre><code>var http = require('http');
  
  http.createServer(function(req, res){
      console.log("test");
  }).listen(9876);
  </code></pre>
  
  <p>now I wanna answer any request on <strong><a href="http://[anything].localhost:9876/[anything]" rel="nofollow">http://[anything].localhost:9876/[anything]</a></strong>
  it can be done by  <strong>htaccess</strong> in apache,what is alternative in NodeJS?</p>