https://github.com/arpith/pingu
Broadcast messages to all connected clients
https://github.com/arpith/pingu
Last synced: 3 months ago
JSON representation
Broadcast messages to all connected clients
- Host: GitHub
- URL: https://github.com/arpith/pingu
- Owner: arpith
- License: cc0-1.0
- Created: 2015-05-23T19:04:01.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-05-25T10:42:36.000Z (about 11 years ago)
- Last Synced: 2025-02-25T14:50:32.503Z (over 1 year ago)
- Language: Go
- Size: 137 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pingu
Broadcast messages to all your web users
REST API to publish notifications to browsers via [Server Sent Events](https://developer.mozilla.org/en-US/docs/Server-sent_events) (lightweight one-way WebSockets).
## Usage
###Creating a channel
Make a POST request to `/session` to obtain the channel ID and an auth token (used to post messages to the channel)
###Subscribing to the channel
Make a GET request to `/broadcast/channelID` to receive notifications on this channel via SSE
###Broadcasting a message to all subscribers
Make a POST request to `/broadcast/channelID` with token and message as parameters