Skip to content

ashishch164/WEB-CHAT-BOX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WEB-CHAT-BOX

Description

• Developed a Web-chat Box using socket.io, in which one person can send message to everyone (who are connected to the server) in one go or individually and also receive messages from them.
Tech stack used: HTML, CSS, JavaScript, socket.io, express js
• IDE used: Visual Studio Code

->Why i choose socket.io for this ??

Writing a chat application with popular web applications stacks like LAMP (PHP) has normally been very hard. It involves polling the server for changes, keeping track of timestamps, and it’s a lot slower than it should be.

Sockets have traditionally been the solution around which most real-time chat systems are architected, providing a bi-directional communication channel between a client and a server.

Features

It has a very simple layout. Users can exchange messages between them.

Note : This application works only on my system. I have to write localhost:1234 on browser's URL (where I hosted my server of this webchat application). So to start my server, I have to execute server.js file, then server becomes active and open this URL in two tabs of browser (just to look like two persons are chatting from two different system).

Operations

  1. First of all user has to login to the web chat app using username and password.
  2. After that chat box will open where user can send message to everyone(who are connected to the server) without specifying name.
  3. If user wants to send message to a particular person, then he/she needs to mention his/her name in textbox, then he/she could write message in message box and send message to him/her. They(online users) can also see the messages which they are exchanging between them.

Installation

  1. First of all create a folder and put all tha files as it is in that folder.
  2. Open cmd and type this following commands and after every command press enter
    • npm init (This will create package.json)
    • npm install express@4 (This will create node_modules folder and package-lock.json and install express js)
    • npm i install socket.io (This will install socket.io)

About

This is a web chat box

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published