It uses socket.io which is a library which uses principle of Web sockets protocol to provide simultanous messaging feature in real time like Whatsapp and automatic reconection.
It is built using two components:
- A Node Server which handles incoming and outgoing of messages, and provide real time messaging without delay.
- A client side website that it provide a interface to a user to interact with other users who are also using this application.
Features
- Display notification for new user joining and any user leaving the chat.
- Conservation with users through messaging in real time.
Following image below is a example for same.
The URL mention in the description is only the Front end part of my Project, not fully functional.
https://jatin00000.github.io/ChatRoom/
To experience full functional application, Kindly follow below given steps in this document.....
Step 1: Importing necessary files and modules
- In order to run server, you need to install NodeJs in your machine.
You can install it from Here - Copy all the files and folders from my repository of ChatRoom from github to your machine.
- In order to import necessary modules of NodeJs, follow below steps:
- Open the 📂 NodeServer folder in your Windows or Linus Terminal
- Type the below code in terminal and it will automatically download and install two necessary modules which are nodemon and socket.io.
- Now we are ready with necessary modules to run the application.
- Open the 📂 NodeServer folder in your Windows or Linus Terminal
Step 2: Setup NodeJs server
- To Set up server, once again open the 📂 NodeServer folder in your Windows or Linus Terminal
- Type below code in the terminal
- Your server is ready. Keep the terminal running until you enjoy ChatRoom.
Step 3: Enjoy ChatRoom
- Open the 📃 index.html file in multiple tabs of your browser.
- Enter User name.
-
- Now its time to Enjoy the ChatRoom.
Problems
A common Problem may report while running the application is Blocked Allow-Control-Allow-Origin
Solution to this problem is to install and enable this Chrome Extension Allow CORS: Access-Control-Allow-Origin
😊 Enjoy Your Day ☀️ 😊