I've followed a tutorial to create a chat with Node.js and Socket.io. The point is that I want to modify this chat to obtain the following result:
I'd like to have two browser windows:
- Window A: I can type and send everything I want.
- Window B: I can't type, I can just view what everyone have typed (me included).
The point is: How can I send a message from Window A (hosted on localhost:8080
) and display it inside Window B (hosted on localhost:8081
)? Can someone give me a clear example on how to do that? Sorry if the question is a little bit confused but I'm kinda new to socket.io and the all the stuff listed in the tutorial that I've followed.