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