Skip to content

Publisher-Subscriber pattern demo using Node and WebSockets.

Notifications You must be signed in to change notification settings

dheerajsuthar/pubsub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PubSub

About

This simple app demonstrate PubSub pattern using Node/WS/Express server and WebSocket client APIs.

Usage

  1. Run server.
npm install
node index.js
  1. Open subscriber (sub.html). You can open multiple subscribers. Select desired channel and click Subscribe.
  2. Open publisher (pub.html). Input desired channel and message to publish. Click Publish.
  3. All the subscribers subscribed to given channel will recieve the message.
  4. To close the server just press Ctrl+C in terminal.

Todos

  • Allow pub/sub simultaneously.
  • Differentiate pub/subs in backend.
  • Use database to store message queue.
  • Better error handling.

About

Publisher-Subscriber pattern demo using Node and WebSockets.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published