function startSecureServer(pathCert, pathKey){
    logger.writeLog(logger.logFile, `start secure server`);

    const httpsServer = Https.createServer({
        key: fs.readFileSync(pathKey),
        cert: fs.readFileSync(pathCert)
    });

    const ws = new server({
        server: httpsServer
    });

    httpsServer.on('request', (req, res) => {
        res.writeHead(200, {
            'Content-Type': 'text/plain'
        });
        res.end('https conn');
    });

    websocketHandler(ws);

    httpsServer.listen(HTTPSPORT);

}
/**
 * start WSS server on port 443
 * @param {String} pathCert - path of server certification
 * @param {String} pathKey - path of key
 */
start WSS server on port 443
@param {String} pathCert - path of server certification
@param {String} pathKey - path of key
start WSS server on port 443 @param { String } pathCert - path of server certification @param { String } pathKey - path of key
function startSecureServer(pathCert, pathKey){
    logger.writeLog(logger.logFile, `start secure server`);
    const httpsServer = Https.createServer({
        key: fs.readFileSync(pathKey),
        cert: fs.readFileSync(pathCert)
    });
    const ws = new server({
        server: httpsServer
    });
    httpsServer.on('request', (req, res) => {
        res.writeHead(200, {
            'Content-Type': 'text/plain'
        });
        res.end('https conn');
    });
    websocketHandler(ws);
    httpsServer.listen(HTTPSPORT);
}
function startSecureServer ( pathCert , pathKey ) { logger . writeLog ( logger . logFile , ` ` ) ; const httpsServer = Https . createServer ( { key : fs . readFileSync ( pathKey ) , cert : fs . readFileSync ( pathCert ) } ) ; const ws = new server ( { server : httpsServer } ) ; httpsServer . on ( 'request' , ( req , res ) => { res . writeHead ( 200 , { 'Content-Type' : 'text/plain' } ) ; res . end ( 'https conn' ) ; } ) ; websocketHandler ( ws ) ; httpsServer . listen ( HTTPSPORT ) ; }
start WSS server on port 443
 @param {String} pathCert - path of server certification
 @param {String} pathKey - path of key
start WSS server on port 443 @param { String } pathCert - path of server certification @param { String } pathKey - path of key