ksentak / simple-ws-pubsub-server

Simple ws pubsub system built with typescript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple WS PubSub Server

A simple WebSocket PubSub server built with TypeScript. WS connections can publish, subscribe, or unsubscribe to different topics.

Message Format

{
  msgType: publish | subscribe | unsubscribe;
  msg: string;
  topic: string;
}

Sample Messages

Publish
{
  "msgType": "publish",
  "msg": "hey there",
  "topic": "topic_001"
}
Subscribe
{
  "msgType": "subscribe",
  "topic": "topic_001"
}
Unsubscribe
{
  "msgType": "unsubscribe",
  "topic": "topic_001"
}

About

Simple ws pubsub system built with typescript


Languages

Language:TypeScript 91.5%Language:JavaScript 6.1%Language:Dockerfile 2.4%