LINXD-2222-debugging-for-i-os #7

Merged
sergiu merged 36 commits from LINXD-2222-debugging-for-i-os into master 2022-09-20 23:16:17 +00:00
Showing only changes of commit efc9bfd114 - Show all commits

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)