express https javascript node.js

using https with express io

So I am new to express and io but I had a server running fine for webRTC but now there is a deprecated method in webRTC that only runs on https so I tried to create an https server but it starts and then immediately exits. I cannot figure out what is wrong and I do not get any errors. Also I am using an aws ec2 to run the express io server. Maybe someone can spot where in my syntax/implementation I am going wrong.

Note I have been googling around for the past half hour and cannot figure it out

Here is the code:

var connect = require('connect');
var https = require('https');
var fs = require('fs');
var express = require('');
var app = express();
var PORT = 443;
var options = {
key: fs.readFileSync('../server.key'),
cert: fs.readFileSync('../server.crt')
//var app = https.createServer(options, app1);
console.log('server started on port ' + PORT);
app.use(express.static(__dirname + '/public'));
app.get('/', function(req, res){
app.listen(PORT);'ready', function(req) {;;'announce', {
message: 'New client in the ' + + ' room.'


I am putting a bounty on this because I would like someone to provide me with a complete answer on setting up the server for production.