LINXD-2222: Update

This commit is contained in:
Sergiu Toma 2022-09-19 23:31:36 +03:00
parent a8afa8a532
commit efc9bfd114

5
app.js
View File

@ -10,7 +10,6 @@ const Server = require('socket.io');
const path = require('node:path'); const path = require('node:path');
const fs = require('node:fs'); const fs = require('node:fs');
const httpolyglot = require('httpolyglot'); const httpolyglot = require('httpolyglot');
const https = httpolyglot.https;
// let https = require('https'); // let https = require('https');
// try { // try {
// https = require('node:https'); // https = require('node:https');
@ -57,9 +56,7 @@ const options = {
// const httpsServer = https.createServer(options, app); // const httpsServer = https.createServer(options, app);
// const io = new Server(httpsServer, { allowEIO3: true }); // const io = new Server(httpsServer, { allowEIO3: true });
const httpsServer = https.createServer(options, app, function(req, res) { const httpsServer = httpolyglot.createServer(options, app);
console.log('🟢 HTTP req', req);
});
httpsServer.listen(process.env.PORT, () => { httpsServer.listen(process.env.PORT, () => {
console.log('Listening on port:', process.env.PORT) console.log('Listening on port:', process.env.PORT)