title: Sails.JS HTTP + HTTPS
body: <p>I am trying to figure out how to lift a sails app that responds to both HTTP and HTTPS requests. I used the config/local.js method of configuring express like so (detailed <a href="http://chrisrogers.me.uk/blog/sails-js-https-ssl/">here</a>):</p>
  
  <pre><code> var fs = require('fs');
  
  module.exports = {
  
    port: process.env.PORT || 1337,
    environment: process.env.NODE_ENV || 'development',
  
    express: { serverOptions : {
      key: fs.readFileSync('ssl/key.pem'),
      cert: fs.readFileSync('ssl/cert.pem')
    }}
  
  };
  </code></pre>
  
  <p>However, while this works, it results in the server <strong><em>only</em></strong> being able to serve HTTPS requests. Has anyone figured out how to get this done, without creating a separate HTTP only server that redirects to port 443 ?</p>
  
  <p>Thanks</p>