Skip to content

vineetdev/websocket-demo-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

websocket-demo-app

A demo app for websockets using express and socket.io library.

Basic app which shows how to use socket.io to send and receive messages.

Pre-requisites: Node JS

Run the app by running below command: $ node index.js In terminal you should see image

Then launch in browser: http://localhost:4000 And browser will have below output image

How to Test: Enter Username. Enter Message. And you should see in the middle screen your name with message.

Open another browser and enter the Username and message. Now when any message is typed from one user it will be shown in both the users window. image

And in the command prompt you will see below logs: image

In above logs you would see websocket connected line for each user browser windows. For each message sent by a user a log line will come.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published