Mehulcoder / Chat-Room

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chat-Room

  1. Make sure that you have npm and Node.js installed. If not, first install them on your local machine.
  2. After doing that, download and extract the files to a folder, say 'Chat-Bot'.
  3. Open the terminal and change the working directory to the 'Chat-Bot' folder(make sure you are inside the main directory which has server.js and all the other files).
  4. Now in the terminal, type: node server.js
  5. In the terminal you'll see a message: Server is running
  6. Now open a browser and go to the url: http://localhost:3000/
  7. You are in the chat room now. Enter your username and click the Login button, then you'll be shown the chat room window where you can type messages.
  8. You can also see the list of all the online users, inside a box.
  9. For a check, open a new tab and repeat step 5-6 but with a different username.
  10. You can see that the online users list has been updated in realtime and also the text messages.
  11. Also if a user closes the window, his/her name will be removed from the list of online users, instantly.

About


Languages

Language:JavaScript 54.1%Language:HTML 44.6%Language:CSS 1.3%