LINXD-2222: Update

This commit is contained in:
Sergiu Toma 2022-09-19 23:30:18 +03:00
parent 507c131058
commit a8afa8a532

7
app.js
View File

@ -9,7 +9,8 @@ const app = express();
const Server = require('socket.io');
const path = require('node:path');
const fs = require('node:fs');
const https = require('httpolyglot');
const httpolyglot = require('httpolyglot');
const https = httpolyglot.https;
// let https = require('https');
// try {
// https = require('node:https');
@ -48,8 +49,8 @@ app.use('/sfu', express.static(path.join(__dirname, 'public')))
// SSL cert for HTTPS access
const options = {
// key: fs.readFileSync('./server/ssl/key.pem', 'utf-8'),
// cert: fs.readFileSync('./server/ssl/cert.pem', 'utf-8'),
key: fs.readFileSync('./server/ssl/key.pem', 'utf-8'),
cert: fs.readFileSync('./server/ssl/cert.pem', 'utf-8'),
requestCert: false,
rejectUnauthorized: false
}