LINXD-2222: Update

This commit is contained in:
Sergiu Toma 2022-09-19 23:31:36 +03:00
parent a8afa8a532
commit efc9bfd114
1 changed files with 1 additions and 4 deletions

5
app.js
View File

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