refactor: add prefix to relative assets

refactor: add prefix to server entrypoints
refactor: add prefix to express router
refactor: add prefix to router basename
This commit is contained in:
Carlos Valente
2024-12-02 15:49:28 +01:00
committed by Carlos Valente
parent b3ce247f54
commit b9ba416366
8 changed files with 86 additions and 60 deletions
+2 -2
View File
@@ -47,8 +47,8 @@ export class SocketServer implements IAdapter {
this.wss = null;
}
init(server: Server) {
this.wss = new WebSocketServer({ path: '/ws', server, maxPayload: this.MAX_PAYLOAD });
init(server: Server, prefix?: string) {
this.wss = new WebSocketServer({ path: `${prefix}/ws`, server, maxPayload: this.MAX_PAYLOAD });
this.wss.on('connection', (ws) => {
const clientId = generateId();