Enabling ssl in socket stream app

65 views Asked by At

I'm writting a socket stream app in which i need it to work with ssl.

Googled it a while, found a link, but the answer link is broken

Any help is appreciable.

1

There are 1 answers

0
Beast On

After some googling, found out we need to do like

var https = require('https')
,   options = {
       key : 'ssl key'
       , cert : 'ssl cert'
}
;

 var server = https.createServer(options, function (req, res) {

 });

ss.start(server.listen('8080'));