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 d54403299f - Show all commits

11
app.js
View File

@ -5,6 +5,7 @@
require('dotenv').config()
const express = require('express');
const app = express();
const Server = require('socket.io');
const path = require('node:path');
const fs = require('node:fs');
let https;
@ -68,8 +69,14 @@ const options = {
// const httpsServer = https.createServer(options, app);
// const io = new Server(httpsServer, { allowEIO3: true });
const httpsServer = https.createServer(app);
const io = require('socket.io')(httpsServer, options);
const httpsServer = https.createServer(app, options);
const io = new Server(httpsServer, {
origins: '*:*',
allowRequest: (req) => {
console.log('req', req);
return true;
}
});
// const io = new Server(server, { origins: '*:*', allowEIO3: true });
// io.use(middleware);