Open Pajsen9263 opened 2 years ago
@Pajsen9263 try this code:
const express = require('express');
const PORT = 3000;
const HOST = '127.0.0.1';
let app = express();
const server = app.listen(PORT, HOST, () => {
console.log(`WS App listening on http://${HOST}:${PORT}`);
console.log('Press Ctrl+C to quit.');
});
let io = require('socket.io')(server, {
allowEIO3: true // this is required because ESM is using an old socket.io version
})
app.use(require('express-status-monitor')({
websocket: io,
}));
@tahayk it is work for me thanks
How do I provide my own socket instance? I tried with
const statusMonitor = require('express-status-monitor')({websocket: io})
. I've also tried with the port my server is on. (It's behind Nginx Proxy Manager, but my other socket stuff work).