Similar to http we can use https . The major difference is that we need to supply a key if we want to publish a chat server .
You can configure it in the file mooSite/lib/MooNodeJsServer/mooServer.js . Find the code bellow :
and change it like the code bellow :
Notice that you need to supply the right key / certificate for the lines :
var privateKey = fs.readFileSync( 'privatekey.pem' );
var certificate = fs.readFileSync( 'certificate.pem' );
A sample implementation could look as follows.
var privateKey = fs.readFileSync( '/home/sitename/ssl/keys/private.key' );
var certificate = fs.readFileSync( '/home/sitename/ssl/certs/yousite.crt' );
After that , you need to restart chat server then it is ready as https://yoursite.com:3000