No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
images
step1
step2
step3
step4
step5
step6
.gitignore
README.md
bower.json
package.json

README.md

KaunasJS Workshop #1

Building chat application with node.js, express and socket.io

Useful links

Step 1: Simple chat

Connect client sockets with server and make simple message communication between all sockets.
Chat example

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. Global and KaunasJS. Each room have online users list and 20 message history. The user can be in only one room at a time.

Step 7: Host to Heroku

Host final step to Heroku.

Hosted KaunasJS workshop #1 @Heroku