feat: move to Socket.IO

This commit is contained in:
Marco Beretta 2024-12-30 01:47:21 +01:00
parent 9a33292f88
commit c864c366d1
No known key found for this signature in database
GPG key ID: D918033D8E74CC11
9 changed files with 216 additions and 135 deletions

View file

@ -15,7 +15,7 @@ const { connectDb, indexSync } = require('~/lib/db');
const { isEnabled } = require('~/server/utils');
const { ldapLogin } = require('~/strategies');
const { logger } = require('~/config');
const { WebSocketService } = require('./services/WebSocket/WebSocketServer');
const { SocketIOService } = require('./services/WebSocket/WebSocketServer');
const validateImageRequest = require('./middleware/validateImageRequest');
const errorController = require('./controllers/ErrorController');
const configureSocialLogins = require('./socialLogins');
@ -49,7 +49,7 @@ const startServer = async () => {
}),
);
new WebSocketService(server);
new SocketIOService(server);
await AppService(app);
@ -150,7 +150,7 @@ const startServer = async () => {
logger.info(`Server listening at http://${host == '0.0.0.0' ? 'localhost' : host}:${port}`);
}
logger.info(`WebSocket endpoint: ws://${host}:${port}`);
logger.info(`Socket.IO endpoint: http://${host}:${port}`);
});
};