Hapijs using both Http and Https on one connection
New to Hapijs and trying to use it to create an app that uses HTTPS for all requests and redirect HTTP to the secure connection.The problem is the app goes in HTTPS mode no problem but if i change the URL to HTTP the server does not respond and don't know the reason why. This is what i have came up with so far, it works but not for HTTP var connectionOptions = { port: 3000, tls: { key: fs.readFileSync(path.join(__dirname, 'key/key.pem'), 'utf8'), cert: fs.readFileSync(path.join(__dirname, 'key/cert.pem'), 'utf8') } }; var server = new Hapi.Server(); server.connection(connectionOptions); //This