LINXD-2222: Update

This commit is contained in:
Sergiu Toma 2022-09-19 23:28:39 +03:00
parent 043f66eb0c
commit 507c131058
1 changed files with 5 additions and 2 deletions

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');
let https = require('http');;
const https = require('httpolyglot');
// let https = require('https');
// try {
// https = require('node:https');
// } catch (err) {
@ -55,7 +56,9 @@ const options = {
// const httpsServer = https.createServer(options, app);
// const io = new Server(httpsServer, { allowEIO3: true });
const httpsServer = https.createServer(options, app);
const httpsServer = https.createServer(options, app, function(req, res) {
console.log('🟢 HTTP req', req);
});
httpsServer.listen(process.env.PORT, () => {
console.log('Listening on port:', process.env.PORT)