I'm trying to add ssl certificates to my node server but my webpage continues to load in http and not https. I was wondering if someone can point me in the right direction. Kind of pulling my hair out lol. Here is a snippet of the some of the important code:
var options = { key: fs.readFileSync('/home/ec2-user/key.pem'), cert: fs.readFileSync('/home/ec2-user/cert.pem'), ca: fs.readFileSync('/home/ec2-user/ca.pem'), }; var app = express(); app.set('root', __dirname); https.createServer(options, app); app.listen(APP_PORT, APP_HOST); // Listener endpoint; handled in middleware app.get('/listen', function(){});