LINXD-2222-debugging-for-i-os #7
5
app.js
5
app.js
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user