Skip to content

Rust WebSockets server that broadcasts Redis Pub/Sub messages

License

Notifications You must be signed in to change notification settings

mminer/redis2ws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redis2ws (Redis to WebSockets)

This demonstrates a Rust WebSockets server that broadcasts Redis Pub/Sub messages to connected clients. Glues together the redis and tungstenite crates.

Usage

  1. Start a Redis server
  2. Run cargo run foo
  3. Connect to ws://localhost:8080 (wscat works well for testing)
  4. Publish a message to the Redis foo channel
Usage: redis2ws [OPTIONS] <CHANNEL>

Arguments:
  <CHANNEL>  Redis PubSub channel

Options:
      --redis <URL>  Redis server address [default: localhost:6379]
      --ws <URL>     WebSocket server address [default: localhost:8080]
  -h, --help         Print help
  -V, --version      Print version

About

Rust WebSockets server that broadcasts Redis Pub/Sub messages

Topics

Resources

License

Stars

Watchers

Forks

Languages