Well your question is too broad. There are plenty of examples out there usin nodejs with socket.io. I suggest to study them first, understand nodejs and websockets, socket.io, rooms etc. Then show an effort to put something together, then ask for some help here. No offense but your question is basically a request from someone to do work for you, write the code and serve you in a golden plate.