start adding showcase screen

This commit is contained in:
2024-06-27 18:39:06 +02:00
parent 1e11f1dc2e
commit 7a42ab8b4e
17 changed files with 882 additions and 504 deletions

View File

@@ -2,5 +2,6 @@
"token": "phafowegoväbwpb$weapvbpvfwcvfäawef39'ü0wtäqgpt5^ü62q'ẗ9wäa3g",
"name": "localhost:8082",
"client": "localhost:8081",
"backendURL": "http://localhost:8080"
"backendURL": "http://localhost:8080",
"failReturnURL": "http://localhost:8081"
}

View File

@@ -67,7 +67,23 @@ const run = () => {
cb( {
status: true,
msg: 'ADDED_TO_ROOM'
} )
} );
} else {
cb( {
status: false,
msg: 'ERR_TOKEN_INVALID'
} );
}
} );
socket.on( 'delete-room', ( room: { name: string, token: string }, cb: ( res: { status: boolean, msg: string } ) => void ) => {
if ( room.token === socketData[ room.name ].roomToken ) {
socket.leave( room.name );
socketData[ room.name ] = undefined;
cb( {
status: true,
msg: 'ROOM_DELETED'
} );
} else {
cb( {
status: false,
@@ -193,7 +209,7 @@ const run = () => {
} );
const PORT = process.env.PORT || 8081;
const PORT = process.env.PORT || 8082;
httpServer.listen( PORT );
}