Skip to content

kryptance/node-websocket-message-broker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-websocket-message-broker

Minimal message broker supporting websocket and push notification based on socket.io and web-push.

Endpoints:

##Websocket There are the following messages

  • subscription message
  • un-subscribe message
  • message
  • update channel

See types.ts

REST

/push-subscribe

This will subscribe the web-push to a certain broker destination/topic

REQUEST

{
  "webPushSubscription": {
    "endpoint": "https://....",
    "keys": {
      "p256dh": ".....",
      "auth": "....."
    }
  },
  "brokerSubscription": {
    "destination": "064ee3993d081f8d947db3226ec0c3c7cc1a66859094b7c45ca830df133a1fd1",
    "topic": "news"
  }
}

RESPONSE

{
  "brokerSubscriptionId": "some_random_id"
}

/push-unsubscribe

REQUEST

{
  "brokerSubscriptionId": "some_random_id"
}

About

Minimal websocket broker based on socket.io

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors