Skip to content

An example of realtime nodejs application to learn and understand about Websocket APIs

Notifications You must be signed in to change notification settings

quyettranvu/Realtime-WebsocketAPI-Nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1/In case want to show the message from client sent to the server and show for other clients then enable this line of code: console.log('Message from server: ', reader.result);

2/Logically we can also use the action "on" or use addEventListener: ws.onopen = () => { console.log('Connection opened!'); }

Alternatively(the rest for other actions(events)): ws.addEventListener('open', function (event) { console.log('Connected to WS Server') });

About

An example of realtime nodejs application to learn and understand about Websocket APIs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published