KaunasJS Workshop #1
Step 1: Simple chat
Example from Socket.io
Step 2: Add support for nicknames
Let's add nicknames support for chat and add some field validation, so you cannot send a message if a nickname or message field is empty.
Step 3: Broadcast implementation
Don’t send the same message to the user that sent it himself. Instead, append the message directly as soon as he presses enter.
Step 4: Show who’s online
Add online users list to the chat. If the users provide nickname, add him to the online users list.
Step 5: Add chat history of 20 messages
Add chat history, so when next time you connect to chat you can see the last 20 messages.
Step 6: Add chat rooms
Let's add 2 chat rooms.
KaunasJS. Each room have online users list and 20 message history. The user can be in only one room at a time.
Host final step to Heroku.