You need to be familiar with the use of socketio.
Latest update: room group contains room information and room contains user information.
When the user loses the connection, only push the user out of the room.
I will integrate and give the complete demo.
Preparation: NPM I
NPM start for development environment
Formal environment needs PM2 support
For deployment: NPM run PM2
Note that the WWW document is an older version and is for reference only.