8000 GitHub - kaunasjs/workshop-1
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

kaunasjs/workshop-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
0