var https=require('https');var ws=require('ws');var fs=require('fs');var keypath=process.cwd()+'/ssl_certificate_key.key';var certpath=process.cwd()+'/ssl_certificate.pem';var options = {
key: fs.readFileSync(keypath),
cert: fs.readFileSync(certpath)
};var server=https.createServer(options, function (req, res) {
res.writeHead(403);
res.end("This is a WebSockets server!\n");
}).listen(80);var wss = new ws.Server( { server: server } );