Sign inSign up

jjv360/simple-pubsub

By jjv360

•Updated almost 6 years ago

A simple WebSocket relay server which does pub/sub messaging.

Image
0

911

jjv360/simple-pubsub repository overview

⁠Simple Pub/Sub - Server

This server provides a simple WebSocket interface for subscribing to channels, and posting and receiving messages to certain channels.

⁠Run on Docker

# Build the image
$ docker build . -t pubsub

# Run the image
$ docker run -d -p 8089:8089 --name pubsub --rm pubsub

⁠Messaging API

// Subscribe to a channel
{ action: "join", channel: "xxx" }

// Unsubscribe from a channel
{ action: "leave", channel: "xxx" }

// Send a message to a channel
{ action: "post", channel: "xxx", data: ... }

// Receive a message
{ channel: "xxx", data: ... }

Tag summary

Content type

Image

Digest

Size

342.4 MB

Last updated

almost 6 years ago

docker pull jjv360/simple-pubsub