title: How to check the HOST using ExpressJS?
body: <p>I have to check the <code>HOST</code> of the http request, if it's equal to <code>example.com</code> or <code>www.example.com</code>, I have to do a 301 redirect.</p>
  
  <p>How can I do this using Node.js and Express Web Framework?</p>